-
Notifications
You must be signed in to change notification settings - Fork 50
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
Make existing controllers into partial classes #6
Comments
For modifying existing controller classes I used a ControllerRewriter with an override for VisitClassDeclaration The classes are marked as partial here Currently I rely on the semantic model to get the declaring type which in turn I use to determine if the class is an MVC controller class. An issue with this is that once you update the node, it invalides the CompilationUnit in the syntax tree and my override for VisitMemberDeclaration will not be able to get the semantic model for the member (which again I use to determine if this is an MVC Controller member) I am investigating how to avoid using the semantic model for type resolution but this appears pretty difficult vs creating a new compilation unit for the syntaxnode passed to the VisitMemberDeclaration override |
I think this can be closed as well, pending @wwwlicious's confirmation. If I understand his comment here there was an issue with changing classes during the compilation process, since back then the code was executing in the early stages of the compilation process. The way the module is currently running - that doesn't seem to be a problem, and there's no reference to At the same time, the controllers are marked as partial without any issues. |
Sounds fine to me. @wwwlicious? |
@artiomchi @kevinkuszyk Yes, I agree this can be closed |
We need to make existing controllers into
partial
classes and make all the action methodsvirtual
.The text was updated successfully, but these errors were encountered: