RickStrahl / Westwind.RazorHosting

Hosting the Razor Runtime outside of ASP.NET/MVC for use in non-Web .NET applications.
144 stars 32 forks source link

Can null propagation be supported? #15

Closed kotpal closed 6 years ago

kotpal commented 6 years ago

If I use "@Model?.Property", it gets rendered as "Westwind.RazorHosting.AnonymousDynamicType?.Property"

Is there any way to support null-propagation please?

RickStrahl commented 6 years ago

That's a compiler setting, really. I think this can be accomplished by having the right compiler directives in the web.config for the host razor instance, although offhand I'm not sure exactly what that looks like and whether that depends on the compilers that are installed. I have to take a look exactly what determines what compiler runtime is used.

RickStrahl commented 6 years ago

Fixed c29aedc9b93fcf21adc73fb39c50ab4ff1dbc054.

https://github.com/RickStrahl/Westwind.RazorHosting#using-latest-c-language-features