Beispiel #1
0
        public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices)
        {
            var textFactory = workspaceServices.GetService <ITextFactoryService>();

            // MemoryMapped files which are used by the TemporaryStorageService are present in .NET Framework (including Mono)
            // and .NET Core Windows. For non-Windows .NET Core scenarios, we can return the TrivialTemporaryStorageService
            // until https://github.com/dotnet/roslyn/issues/42178 is fixed.
            return(PlatformInformation.IsWindows || PlatformInformation.IsRunningOnMono
                ? (ITemporaryStorageService) new TemporaryStorageService(textFactory)
                : TrivialTemporaryStorageService.Instance);
        }
Beispiel #2
0
        public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices)
        {
            if (cache == null)
            {
                var service  = workspaceServices.GetService <IOptionService>();
                var newCache = CreateCache(service);

                Interlocked.CompareExchange(ref cache, newCache, null);
            }

            return(cache);
        }
Beispiel #3
0
        public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices)
        {
            var hostService = workspaceServices.GetService <IProjectCacheHostService>();

            return(new Service(hostService));
        }
Beispiel #4
0
        public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices)
        {
            var textFactory = workspaceServices.GetService <ITextFactoryService>();

            return(new TemporaryStorageService(textFactory));
        }
Beispiel #5
0
 public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices)
 {
     return(new Service(workspaceServices.GetService <IDocumentationProviderService>()));
 }