Created
May 11, 2020 14:30
-
-
Save MikeCodesDotNET/b183eebe841d5e057c2f253c5a6edb08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Compilation compilation; | |
private SemanticModel semanticModel; | |
private CompilationUnitSyntax syntaxRootNode; | |
// Validation Class Constructor | |
public ScriptValidator(Script script) | |
{ | |
compilation = script.GetCompilation(); | |
SyntaxTree syntaxTree = compilation.SyntaxTrees.First(); | |
syntaxRootNode = syntaxTree.GetRoot() as CompilationUnitSyntax; | |
semanticModel = compilation.GetSemanticModel(compilation.SyntaxTrees.First()); | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment