当前位置: 首页>>代码示例>>C#>>正文


C# ExportProvider类代码示例

本文整理汇总了C#中ExportProvider的典型用法代码示例。如果您正苦于以下问题:C# ExportProvider类的具体用法?C# ExportProvider怎么用?C# ExportProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ExportProvider类属于命名空间,在下文中一共展示了ExportProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateView

 public static IWpfTextView CreateView(
     string contentType,
     ExportProvider exportProvider,
     params string[] lines)
 {
     var buffer = CreateBuffer(contentType, exportProvider, lines);
     return exportProvider.GetExportedValue<ITextEditorFactoryService>().CreateTextView(buffer);
 }
开发者ID:GloryChou,项目名称:roslyn,代码行数:8,代码来源:EditorFactory.cs

示例2: CreateWorkspaceFromFilesAsync

 public static Task<TestWorkspace> CreateWorkspaceFromFilesAsync(
     string[] files,
     CSharpParseOptions[] parseOptions = null,
     CSharpCompilationOptions compilationOptions = null,
     ExportProvider exportProvider = null)
 {
     return CreateWorkspaceFromFilesAsync(LanguageNames.CSharp, compilationOptions, parseOptions, files, exportProvider);
 }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:8,代码来源:CSharpWorkspaceFactory.cs

示例3: VisualStudioTestExportProvider

        static VisualStudioTestExportProvider()
        {
            PartCatalog =
                TestExportProvider.EntireAssemblyCatalogWithCSharpAndVisualBasic.WithParts(
                    MinimalTestExportProvider.CreateAssemblyCatalog(typeof(CSharpCodeModelService).Assembly));

            ExportProvider = MinimalTestExportProvider.CreateExportProvider(PartCatalog);
        }
开发者ID:Rickinio,项目名称:roslyn,代码行数:8,代码来源:VisualStudioTestExportProvider.cs

示例4: CreateWorkspaceFromLinesAsync

 public static Task<TestWorkspace> CreateWorkspaceFromLinesAsync(
     string[] lines,
     ExportProvider exportProvider,
     string[] metadataReferences = null)
 {
     var file = lines.Join(Environment.NewLine);
     return CreateWorkspaceFromFileAsync(file, exportProvider: exportProvider, metadataReferences: metadataReferences);
 }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:8,代码来源:VisualBasicWorkspaceFactory.cs

示例5: CreateWorkspaceFromFilesAsync

 /// <param name="files">Can pass in multiple file contents with individual source kind: files will be named test1.vb, test2.vbx, etc.</param>
 public static Task<TestWorkspace> CreateWorkspaceFromFilesAsync(
     string[] files,
     ParseOptions[] parseOptions = null,
     CompilationOptions compilationOptions = null,
     ExportProvider exportProvider = null)
 {
     return TestWorkspaceFactory.CreateWorkspaceFromFilesAsync(LanguageNames.VisualBasic, compilationOptions, parseOptions, files, exportProvider);
 }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:9,代码来源:VisualBasicWorkspaceFactory.cs

示例6: CreateWorkspaceFromLinesAsync

 public static Task<TestWorkspace> CreateWorkspaceFromLinesAsync(
     string[] lines,
     CSharpParseOptions parseOptions = null,
     CSharpCompilationOptions compilationOptions = null,
     ExportProvider exportProvider = null)
 {
     var file = lines.Join(Environment.NewLine);
     return CreateWorkspaceFromFileAsync(file, parseOptions, compilationOptions, exportProvider);
 }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:9,代码来源:CSharpWorkspaceFactory.cs

示例7: CreateWorkspaceFromFiles

 /// <param name="files">Can pass in multiple file contents: files will be named test1.vb, test2.vb, etc. and additional metadata references</param>
 public static TestWorkspace CreateWorkspaceFromFiles(
     string[] files,
     ParseOptions parseOptions = null,
     CompilationOptions compilationOptions = null,
     ExportProvider exportProvider = null,
     string[] metadataReferences = null)
 {
     return TestWorkspaceFactory.CreateWorkspaceFromFiles(LanguageNames.VisualBasic, compilationOptions, parseOptions, files, exportProvider, metadataReferences);
 }
开发者ID:GloryChou,项目名称:roslyn,代码行数:10,代码来源:VisualBasicWorkspaceFactory.cs

示例8: CreateWorkspaceFromFile

 /// <param name="content">Can pass in multiple file contents: files will be named test1.cs, test2.cs, etc.</param>
 /// <param name="parseOptions">Parse the source code in interactive mode</param>
 public static TestWorkspace CreateWorkspaceFromFile(
     string file,
     CSharpParseOptions parseOptions = null,
     CSharpCompilationOptions compilationOptions = null,
     ExportProvider exportProvider = null,
     string[] metadataReferences = null)
 {
     return CreateWorkspaceFromFiles(new[] { file }, parseOptions, compilationOptions, exportProvider, metadataReferences);
 }
开发者ID:GloryChou,项目名称:roslyn,代码行数:11,代码来源:CSharpWorkspaceFactory.cs

示例9: CreateWorkspaceFromFiles

 /// <param name="files">Can pass in multiple file contents: files will be named test1.cs, test2.cs, etc.</param>
 public static TestWorkspace CreateWorkspaceFromFiles(
     string[] files,
     CSharpParseOptions parseOptions = null,
     CSharpCompilationOptions compilationOptions = null,
     ExportProvider exportProvider = null,
     string[] metadataReferences = null)
 {
     return CreateWorkspaceFromFiles(LanguageNames.CSharp, compilationOptions, parseOptions, files, exportProvider, metadataReferences);
 }
开发者ID:GloryChou,项目名称:roslyn,代码行数:10,代码来源:CSharpWorkspaceFactory.cs

示例10: CreateWorkspace

 public static TestWorkspace CreateWorkspace(
     XElement workspaceElement,
     bool completed = true,
     bool openDocuments = true,
     ExportProvider exportProvider = null,
     string workspaceKind = null)
 {
     return CreateWorkspaceAsync(workspaceElement, completed, openDocuments, exportProvider, workspaceKind).WaitAndGetResult(CancellationToken.None);
 }
开发者ID:ralfkang,项目名称:roslyn,代码行数:9,代码来源:TestWorkspaceFactory_XmlConsumption.cs

示例11: CreateWorkspaceFromFileAsync

 public static Task<TestWorkspace> CreateWorkspaceFromFileAsync(
     string file,
     ParseOptions parseOptions = null,
     CompilationOptions compilationOptions = null,
     ExportProvider exportProvider = null,
     string[] metadataReferences = null)
 {
     return CreateWorkspaceFromFilesAsync(new[] { file }, parseOptions, compilationOptions, exportProvider, metadataReferences);
 }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:9,代码来源:VisualBasicWorkspaceFactory.cs

示例12: Add

        /// <summary>
        ///     The add.
        /// </summary>
        /// <param name="provider">
        ///     The provider.
        /// </param>
        public void Add(ExportProvider provider)
        {
            Contract.Requires<ArgumentNullException>(provider != null, "provider");

            lock (_providers)
            {
                _providers.Add(provider);
                provider.ExportsChanged += OnExportsChanged;
            }
        }
开发者ID:Tauron1990,项目名称:Tauron-Application-Common,代码行数:16,代码来源:ExportProviderRegistry.cs

示例13: CreateBuffer

 public static ITextBuffer CreateBuffer(
     string contentType,
     ExportProvider exportProvider,
     params string[] lines)
 {
     var text = LinesToFullText(lines);
     var intContentType = exportProvider.GetExportedValue<IContentTypeRegistryService>().GetContentType(contentType);
     var buffer = exportProvider.GetExportedValue<ITextBufferFactoryService>().CreateTextBuffer(intContentType);
     buffer.Replace(new Span(0, 0), text);
     return buffer;
 }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:11,代码来源:EditorFactory.cs

示例14: CreateView

        public static IWpfTextView CreateView(
            string contentType,
            ExportProvider exportProvider,
            params string[] lines)
        {
            TestWorkspace.ResetThreadAffinity();
            WpfTestCase.RequireWpfFact($"Creates an IWpfTextView through {nameof(EditorFactory)}.{nameof(CreateView)}");

            var buffer = CreateBuffer(contentType, exportProvider, lines);
            return exportProvider.GetExportedValue<ITextEditorFactoryService>().CreateTextView(buffer);
        }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:11,代码来源:EditorFactory.cs

示例15: CreateVisualBasicAsync

 public static Task<TestWorkspace> CreateVisualBasicAsync(
     string[] files,
     ParseOptions parseOptions = null,
     CompilationOptions compilationOptions = null,
     ExportProvider exportProvider = null,
     string[] metadataReferences = null)
 {
     return CreateAsync(LanguageNames.VisualBasic, compilationOptions, parseOptions, files, exportProvider, metadataReferences);
 }
开发者ID:peter76111,项目名称:roslyn,代码行数:9,代码来源:TestWorkspace_Create.cs


注:本文中的ExportProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。