예제 #1
0
 private OmniSharpRefactoringContext GetRefactoringContext(Request req)
 {
     var q = _bufferParser.ParsedContent(req.Buffer, req.FileName);
     var resolver = new CSharpAstResolver(q.Compilation, q.SyntaxTree, q.UnresolvedFile);
     var doc = new StringBuilderDocument(req.Buffer);
     var location = new TextLocation(req.Line, req.Column);
     var refactoringContext = new OmniSharpRefactoringContext(doc, location, resolver);
     return refactoringContext;
 }
예제 #2
0
 public TestScript(OmniSharpRefactoringContext context)
     : base(context.Document, FormattingOptionsFactory.CreateAllman(), new TextEditorOptions())
 {
     this.context = context;
 }