public static ComposableCatalog GetEditorAssemblyCatalog() { var assemblies = new[] { // EDITOR // Microsoft.VisualStudio.Platform.VSEditor.dll: Assembly.LoadFrom("Microsoft.VisualStudio.Platform.VSEditor.dll"), // Microsoft.VisualStudio.Text.Logic.dll: // Must include this because several editor options are actually stored as exported information // on this DLL. Including most importantly, the tab size information. typeof(Microsoft.VisualStudio.Text.Editor.DefaultOptions).Assembly, // Microsoft.VisualStudio.Text.UI.dll: // Include this DLL to get several more EditorOptions including WordWrapStyle. typeof(Microsoft.VisualStudio.Text.Editor.WordWrapStyle).Assembly, // Microsoft.VisualStudio.Text.UI.Wpf.dll: // Include this DLL to get more EditorOptions values. typeof(Microsoft.VisualStudio.Text.Editor.HighlightCurrentLineOption).Assembly, // BasicUndo.dll: // Include this DLL to satisfy ITextUndoHistoryRegistry typeof(BasicUndo.IBasicUndoHistory).Assembly, // Microsoft.VisualStudio.Language.StandardClassification.dll: typeof(Microsoft.VisualStudio.Language.StandardClassification.PredefinedClassificationTypeNames).Assembly, // Microsoft.VisualStudio.Language typeof(Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.IAsyncCompletionBroker).Assembly, // Microsoft.VisualStudio.CoreUtility typeof(Microsoft.VisualStudio.Utilities.IFeatureServiceFactory).Assembly, // Microsoft.VisualStudio.Text.Internal typeof(Microsoft.VisualStudio.Text.Utilities.IExperimentationServiceInternal).Assembly, }; // Consider removing the internal service from the output: https://github.com/dotnet/roslyn/issues/30249 return(ExportProviderCache.GetOrCreateAssemblyCatalog(assemblies, ExportProviderCache.CreateResolver()) .WithPart(typeof(TestExperimentationServiceInternal))); }
public static ComposableCatalog CreateAssemblyCatalog() { return(ExportProviderCache.GetOrCreateAssemblyCatalog(GetLanguageNeutralTypes().Select(t => t.Assembly).Distinct(), ExportProviderCache.CreateResolver()) .WithParts(MinimalTestExportProvider.GetEditorAssemblyCatalog())); }
private static ComposableCatalog CreateAssemblyCatalogWithCSharpAndVisualBasic() { return(ExportProviderCache .GetOrCreateAssemblyCatalog(GetCSharpAndVisualBasicAssemblies(), ExportProviderCache.CreateResolver()) .WithCompositionService()); }
private static IExportProviderFactory CreateExportProviderFactory() { var catalog = TestExportProvider.GetCSharpAndVisualBasicAssemblyCatalog() .WithParts(ExportProviderCache.GetOrCreateAssemblyCatalog(new[] { typeof(EditorServicesUtil).Assembly }, ExportProviderCache.CreateResolver())); return(ExportProviderCache.GetOrCreateExportProviderFactory(catalog)); }
public static ComposableCatalog GetCSharpAndVisualBasicAssemblyCatalog() { return(ExportProviderCache.GetOrCreateAssemblyCatalog( GetNeutralAndCSharpAndVisualBasicTypes().Select(t => t.Assembly).Distinct(), ExportProviderCache.CreateResolver()) .WithParts(MinimalTestExportProvider.GetEditorAssemblyCatalog()) .WithDefaultFakes()); }
private static IExportProviderFactory CreateExportProviderFactory() { var assemblies = TestExportProvider .GetCSharpAndVisualBasicAssemblies() .Concat(new[] { typeof(EditorServicesUtil).Assembly }); return(ExportProviderCache.GetOrCreateExportProviderFactory(ExportProviderCache.GetOrCreateAssemblyCatalog(assemblies, ExportProviderCache.CreateResolver()))); }