public LanguageServer(ChannelBase serverChannel) : base(serverChannel, MessageProtocolType.LanguageServer) { var hostServices = CreateHostServices(); _exportProvider = hostServices; _workspace = new LanguageServerWorkspace(hostServices); }
public MefWorkspaceServices(IMefHostExportProvider host, Workspace workspace) { _exportProvider = host; _workspace = workspace; _services = host.GetExports <IWorkspaceService, WorkspaceServiceMetadata>() .Concat(host.GetExports <IWorkspaceServiceFactory, WorkspaceServiceMetadata>() .Select(lz => new Lazy <IWorkspaceService, WorkspaceServiceMetadata>(() => lz.Value.CreateService(this), lz.Metadata))) .ToImmutableArray(); }
internal override AbstractPersistentStorageService GetStorageService( IMefHostExportProvider exportProvider, IPersistentStorageLocationService locationService, IPersistentStorageFaultInjector?faultInjector ) => new SQLitePersistentStorageService( exportProvider.GetExports <SQLiteConnectionPoolService>().Single().Value, locationService, faultInjector );
internal override AbstractPersistentStorageService GetStorageService( OptionSet options, IMefHostExportProvider exportProvider, IPersistentStorageLocationService locationService, IPersistentStorageFaultInjector?faultInjector, string relativePathBase) { var threadingContext = exportProvider.GetExports <IThreadingContext>().Single().Value; return(new MockCloudCachePersistentStorageService( locationService, relativePathBase, cs => { if (cs is IAsyncDisposable asyncDisposable) { threadingContext.JoinableTaskFactory.Run( () => asyncDisposable.DisposeAsync().AsTask()); } else if (cs is IDisposable disposable) { disposable.Dispose(); } })); }
public LanguageServerWorkspace(MefHostServices hostServices, string rootPath) : base(hostServices) { _hostServices = hostServices; _rootPath = rootPath; }
internal abstract AbstractPersistentStorageService GetStorageService(IMefHostExportProvider exportProvider, IPersistentStorageLocationService locationService, IPersistentStorageFaultInjector?faultInjector);
internal abstract AbstractPersistentStorageService GetStorageService( IMefHostExportProvider exportProvider, IPersistentStorageConfiguration configuration, IPersistentStorageFaultInjector?faultInjector, string rootFolder);
public static IEnumerable <TExtension> GetExportedValues <TExtension>(this IMefHostExportProvider provider) => provider.GetExports <TExtension>().Select(l => l.Value);
public static TExtension GetExportedValue <TExtension>(this IMefHostExportProvider provider) => provider.GetExports <TExtension>().Single().Value;
internal override AbstractPersistentStorageService GetStorageService(IMefHostExportProvider exportProvider, IPersistentStorageConfiguration configuration, IPersistentStorageFaultInjector?faultInjector, string relativePathBase) => new SQLitePersistentStorageService( exportProvider.GetExports <SQLiteConnectionPoolService>().Single().Value, configuration, exportProvider.GetExports <IAsynchronousOperationListenerProvider>().Single().Value.GetListener(FeatureAttribute.PersistentStorage), faultInjector);
internal override AbstractPersistentStorageService GetStorageService(IMefHostExportProvider exportProvider, IPersistentStorageLocationService locationService, IPersistentStorageFaultInjector faultInjector) => new SQLitePersistentStorageService(locationService, faultInjector);
public LanguageServerWorkspace(MefHostServices hostServices) : base(hostServices) { _hostServices = hostServices; }
internal abstract AbstractPersistentStorageService GetStorageService( OptionSet options, IMefHostExportProvider exportProvider, IPersistentStorageLocationService locationService, IPersistentStorageFaultInjector?faultInjector, string rootFolder);
internal override AbstractPersistentStorageService GetStorageService( IMefHostExportProvider exportProvider, IPersistentStorageConfiguration configuration, IPersistentStorageFaultInjector?faultInjector, string relativePathBase) { return(new MockCloudCachePersistentStorageService(configuration, relativePathBase)); }
internal override AbstractPersistentStorageService GetStorageService(OptionSet options, IMefHostExportProvider exportProvider, IPersistentStorageLocationService locationService, IPersistentStorageFaultInjector?faultInjector, string relativePathBase) => new SQLitePersistentStorageService(options, exportProvider.GetExports <SQLiteConnectionPoolService>().Single().Value, locationService, faultInjector);