public LanguageServiceProviderFactoryWorkspaceServiceFactory(ExportSource exports)
        {
            this.languageServices         = exports.GetExports <ILanguageService, LanguageServiceMetadata>();
            this.languageServiceFactories = exports.GetExports <ILanguageServiceFactory, LanguageServiceMetadata>();

            this.unboundServices = new Lazy <ImmutableList <KeyValuePair <LanguageServiceMetadata, Func <ILanguageServiceProvider, ILanguageService> > > >(
                () => languageServices.Select(ls => new KeyValuePair <LanguageServiceMetadata, Func <ILanguageServiceProvider, ILanguageService> >(ls.Metadata, (lsp) => ls.Value))
                .Concat(languageServiceFactories.Select(lsf => new KeyValuePair <LanguageServiceMetadata, Func <ILanguageServiceProvider, ILanguageService> >(lsf.Metadata, (lsp) => lsf.Value.CreateLanguageService(lsp)))).ToImmutableList());
        }
        public LanguageServiceProviderFactoryWorkspaceServiceFactory(ExportSource exports)
        {
            this.languageServices = exports.GetExports<ILanguageService, LanguageServiceMetadata>();
            this.languageServiceFactories = exports.GetExports<ILanguageServiceFactory, LanguageServiceMetadata>();

            this.unboundServices = new Lazy<ImmutableList<KeyValuePair<LanguageServiceMetadata, Func<ILanguageServiceProvider, ILanguageService>>>>(
                () => languageServices.Select(ls => new KeyValuePair<LanguageServiceMetadata, Func<ILanguageServiceProvider, ILanguageService>>(ls.Metadata, (lsp) => ls.Value))
                        .Concat(languageServiceFactories.Select(lsf => new KeyValuePair<LanguageServiceMetadata, Func<ILanguageServiceProvider, ILanguageService>>(lsf.Metadata, (lsp) => lsf.Value.CreateLanguageService(lsp)))).ToImmutableList());
        }
        public WorkspaceServiceProviderFactory(ExportSource exports)
        {
            this.Exports = exports;
            this.workspaceServiceFactories = exports.GetExports <IWorkspaceServiceFactory, WorkspaceServiceMetadata>();
            this.workspaceServices         = exports.GetExports <IWorkspaceService, WorkspaceServiceMetadata>();

            this.unboundServices = new Lazy <ImmutableList <KeyValuePair <WorkspaceServiceMetadata, Func <IWorkspaceServiceProvider, IWorkspaceService> > > >(() =>
                                                                                                                                                              workspaceServices.Select(ws => new KeyValuePair <WorkspaceServiceMetadata, Func <IWorkspaceServiceProvider, IWorkspaceService> >(ws.Metadata, (wsp) => ws.Value))
                                                                                                                                                              .Concat(workspaceServiceFactories.Select(wsf => new KeyValuePair <WorkspaceServiceMetadata, Func <IWorkspaceServiceProvider, IWorkspaceService> >(wsf.Metadata, (wsp) => wsf.Value.CreateService(wsp)))).ToImmutableList());
        }
        public WorkspaceServiceProviderFactory(ExportSource exports)
        {
            this.Exports = exports;
            this.workspaceServiceFactories = exports.GetExports<IWorkspaceServiceFactory, WorkspaceServiceMetadata>();
            this.workspaceServices = exports.GetExports<IWorkspaceService, WorkspaceServiceMetadata>();

            this.unboundServices = new Lazy<ImmutableList<KeyValuePair<WorkspaceServiceMetadata, Func<IWorkspaceServiceProvider, IWorkspaceService>>>>(() =>
                    workspaceServices.Select(ws => new KeyValuePair<WorkspaceServiceMetadata, Func<IWorkspaceServiceProvider, IWorkspaceService>>(ws.Metadata, (wsp) => ws.Value))
                    .Concat(workspaceServiceFactories.Select(wsf => new KeyValuePair<WorkspaceServiceMetadata, Func<IWorkspaceServiceProvider, IWorkspaceService>>(wsf.Metadata, (wsp) => wsf.Value.CreateService(wsp)))).ToImmutableList());
        }
 public CSharpSyntaxFormattingService(ExportSource exports)
     : this(exports.GetExports<IFormattingRule, OrderableLanguageMetadata>())
 {
 }
 public ExportedOptionProvider(ExportSource exports)
 {
     this.options = exports.GetExports <IOption>();
 }
 public ExportedOptionProvider(ExportSource exports)
 {
     this.options = exports.GetExports<IOption>();
 }
 public OptionService(ExportSource exports)
     : this(
         exports.GetExports <IOptionProvider>(),
         exports.GetExports <IOptionSerializer, OptionSerializerMetadata>())
 {
 }
Exemple #9
0
 public CSharpSyntaxFormattingService(ExportSource exports)
     : this(exports.GetExports <IFormattingRule, OrderableLanguageMetadata>())
 {
 }