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; }
public TestScript(OmniSharpRefactoringContext context) : base(context.Document, FormattingOptionsFactory.CreateAllman(), new TextEditorOptions()) { this.context = context; }