internal static async Task <ItemGetter> CreateAsync(
                AbstractOverrideCompletionProvider overrideCompletionProvider,
                Document document,
                int position,
                CancellationToken cancellationToken)
            {
                var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);

                var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);

                var startLineNumber = text.Lines.IndexOf(position);
                var startLine       = text.Lines[startLineNumber];

                return(new ItemGetter(overrideCompletionProvider, document, position, text, syntaxTree, startLineNumber, startLine, cancellationToken));
            }
 private ItemGetter(
     AbstractOverrideCompletionProvider overrideCompletionProvider,
     Document document,
     int position,
     SourceText text,
     SyntaxTree syntaxTree,
     int startLineNumber,
     TextLine startLine,
     CancellationToken cancellationToken)
 {
     _provider          = overrideCompletionProvider;
     _document          = document;
     _position          = position;
     _text              = text;
     _syntaxTree        = syntaxTree;
     _startLineNumber   = startLineNumber;
     _startLine         = startLine;
     _cancellationToken = cancellationToken;
 }