We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using v4.0.0-preview4
v4.0.0-preview4
This property:
[Projectable] public string Status => IsDeceased ? "Deceased" + (DeceasedDate != null ? $" ({DeceasedDate.Value.ToDateString()})" : "") : "";
Generates this code:
static global::System.Linq.Expressions.Expression<global::System.Func<global::MyApp.MyModel, string>> Expression() { return (global::MyApp.MyModel @this) => @this.IsDeceased ? "Deceased" + (@this.DeceasedDate != null ? $" ({global::MyApp.Extensions.ToDateString(@this.DeceasedDate.Value)})" : "") : ""; }
Which won't compile because in $" ({global::MyApp.Extensions.... - the colon (:) is a special character and breaks the generated interpolated string.
$" ({global::MyApp.Extensions....
:
I think perhaps the fix would be to wrap the static method in parenthesis, e.g.:
return (global::MyApp.MyModel @this) => @this.IsDeceased ? "Deceased" + (@this.DeceasedDate != null ? $" ({(global::MyApp.Extensions.ToDateString(@this.DeceasedDate.Value))})" : "") : "";
The text was updated successfully, but these errors were encountered:
020facf
Merge pull request #119 from PhenX/bugfix/115-string-interpolation
2075d4c
Add parenthesis inside string interpolations (Fixes #115)
No branches or pull requests
I'm using
v4.0.0-preview4
This property:
Generates this code:
Which won't compile because in
$" ({global::MyApp.Extensions....
- the colon (:
) is a special character and breaks the generated interpolated string.I think perhaps the fix would be to wrap the static method in parenthesis, e.g.:
The text was updated successfully, but these errors were encountered: