You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inspect every string interpolation on the project.
Get the type of the parameter. Continue only if it is an interpolated string handler as oppose to System.String.
Connect $"foo" and $"{foo:foo}" onto AppendFormatted and AppendLiteral overloads, respectively.
Check if the parameter of AppendFormatted and AppendLiteral has a Match attribute, if it does, match it against the interpolation.
If it doesn't, check the parameter types of the function. If a parameter has an implicit conversion to either System.String (for value and format) or System.Int32 (for alignment).
Go to the type's implicit conversion function and get the parameters.
For each parameter, get the attributes for Match.
If they exist, test each Match against the literal value that was passed into the specific expression of the string interpolation.
This is a very complicated spec, and as such will likely take a very long time to implement.
Tests have already been added, which at the time of writing is currently failing: 45311dd
Once all tests pass, version 2.1 will be released, assuming no other breaking features are rolled out.
The text was updated successfully, but these errors were encountered:
The goal is to implement the following behavior:
System.String
.$"foo"
and$"{foo:foo}"
ontoAppendFormatted
andAppendLiteral
overloads, respectively.AppendFormatted
andAppendLiteral
has aMatch
attribute, if it does, match it against the interpolation.System.String
(forvalue
andformat
) orSystem.Int32
(foralignment
).Match
.Match
against the literal value that was passed into the specific expression of the string interpolation.This is a very complicated spec, and as such will likely take a very long time to implement.
Tests have already been added, which at the time of writing is currently failing: 45311dd
Once all tests pass, version
2.1
will be released, assuming no other breaking features are rolled out.The text was updated successfully, but these errors were encountered: