I have a problem with setting a context class to a block of code on a WPF RoslynPad RoslynCodeEditor.
I already have codehighlightning and code completion but I wan't to set a context to the code so I can call an override to a method without having to code the wrapper class.
Code Example without wrapper class
public override object VisitAnnotationConstantRest(JavaParser.AnnotationConstantRestContext context)
{
var example = Visit(context.variableDeclarator());
}
Is it possible to set the wrapping class context of the code using roslyn host?
If I code the wrapper class it works.
Code Example with wrapper class
public class CustomClass : JavaParserBaseVisitor<object>
{
public override object VisitAnnotationConstantRest(JavaParser.AnnotationConstantRestContext context)
{
var example = Visit(context.variableDeclarator());
}
}