-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
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
Request: support @model directive #14
Comments
|
To keep intellisense suggestions use |
@adoconnection thanks for clarifications. Checked that Note |
@sergeyt wont it be hidden surprice, if someone will put |
@adoconnection it can be a documented limitation/behavior. |
@adoconnection, parse the usings is little bit reasonable. Is it possible for me to do some work here? :) |
@garryxiao sure, the only thing is I would like it to be done using Razor tools, sinse razor somehow parse them there should be a way to get usings collection. But I was not able to find out how. There is always a plan B to use regex or something on a template string, I would like to avoid that. |
Please include this in the wiki, or make the wiki public so I could add it :) |
@304NotModified wiki is open now :) |
Is this really true? I tried it and don't see the issue? (check IntelliSense, compiling and running?)
I really prefer support for parsing
Any leads where to start to get this implemented? |
I'm having an issue where I'm trying to use the example for @include and Template, combined with the example for strongly-typed models using @inherit Base. The problem is that the templating approach shows you should use a |
It seems like maybe this wrapper is only required when the model is an anonymous type, based on here: RazorEngineCore/RazorEngineCore/RazorEngineCompiledTemplate.cs Lines 94 to 97 in a86a24b
So in my case I can probably just remove that code. Will see how I go |
Right, without |
On the topic: The model is handled by the template, but if it happens @model directive is present, an exception is thrown at compile. Is there a way to ignore this directive and keep on compiling? |
I've noticed it is not supported yet, right?
The text was updated successfully, but these errors were encountered: