コード例 #1
0
		public static CSharpCompletionTextEditorExtension.CSharpCompletionDataList CreateProvider (string text)
		{
			int cursorPosition;
			SemanticModel semanticModel;
			Document document;

			var engine = CodeCompletionBugTests.CreateEngine (text, out cursorPosition, out semanticModel, out document, null);
			var ext = new CSharpCompletionTextEditorExtension ();
			var list = new CSharpCompletionTextEditorExtension.CSharpCompletionDataList ();
			var result = CodeCompletionBugTests.CreateProvider (text);
			list.AddRange (result);
			ext.AddImportCompletionData (result, list, new RoslynCodeCompletionFactory (ext, semanticModel), semanticModel, cursorPosition);

			return list;
		}
コード例 #2
0
        public static CSharpCompletionTextEditorExtension.CSharpCompletionDataList CreateProvider(string text)
        {
            int           cursorPosition;
            SemanticModel semanticModel;
            Document      document;

            var engine = CodeCompletionBugTests.CreateEngine(text, out cursorPosition, out semanticModel, out document, null);
            var ext    = new CSharpCompletionTextEditorExtension();
            var list   = new CSharpCompletionTextEditorExtension.CSharpCompletionDataList();
            var result = CodeCompletionBugTests.CreateProvider(text);

            list.AddRange(result);
            ext.AddImportCompletionData(result, list, new RoslynCodeCompletionFactory(ext, semanticModel), semanticModel, cursorPosition);

            return(list);
        }