private static void TestCreateTextInferredEncoding(ITextFactoryService textFactoryService, byte[] bytes, Encoding?defaultEncoding, Encoding expectedEncoding) { using var stream = new MemoryStream(bytes); var text = textFactoryService.CreateText(stream, defaultEncoding); Assert.Equal(expectedEncoding, text.Encoding); }
public SolutionServices(Workspace workspace) { this.Workspace = workspace; this.TemporaryStorage = workspace.Services.GetService<ITemporaryStorageService>(); this.TextFactory = workspace.Services.GetService<ITextFactoryService>(); this.TextCache = workspace.Services.GetService<ITextCacheService>(); this.CompilationCacheService = workspace.Services.GetService<ICompilationCacheService>(); this.MetadataReferenceProviderService = workspace.Services.GetService<IMetadataReferenceProviderService>(); }
public SolutionServices(Workspace workspace) { this.Workspace = workspace; this.TemporaryStorage = workspace.Services.GetService <ITemporaryStorageService>(); this.TextFactory = workspace.Services.GetService <ITextFactoryService>(); this.TextCache = workspace.Services.GetService <ITextCacheService>(); this.CompilationCacheService = workspace.Services.GetService <ICompilationCacheService>(); this.MetadataReferenceProviderService = workspace.Services.GetService <IMetadataReferenceProviderService>(); }
public SerializerService(HostWorkspaceServices workspaceServices) { _workspaceServices = workspaceServices; _hostSerializationService = _workspaceServices.GetService <IReferenceSerializationService>(); _tempService = _workspaceServices.GetService <ITemporaryStorageService>() as ITemporaryStorageService2; _textService = _workspaceServices.GetService <ITextFactoryService>(); _lazyLanguageSerializationService = new ConcurrentDictionary <string, IOptionsSerializationService>(concurrencyLevel: 2, capacity: _workspaceServices.SupportedLanguages.Count()); }
private protected SerializerService(HostWorkspaceServices workspaceServices) { _workspaceServices = workspaceServices; _storageService = workspaceServices.GetRequiredService <ITemporaryStorageService>(); _textService = workspaceServices.GetRequiredService <ITextFactoryService>(); _analyzerLoaderProvider = workspaceServices.GetRequiredService <IAnalyzerAssemblyLoaderProvider>(); _documentationService = workspaceServices.GetService <IDocumentationProviderService>(); _lazyLanguageSerializationService = new ConcurrentDictionary <string, IOptionsSerializationService>(concurrencyLevel: 2, capacity: _workspaceServices.SupportedLanguages.Count()); }
public SolutionServices(Workspace workspace, IWorkspaceServiceProvider workspaceServices) { this.Workspace = workspace; this.WorkspaceServices = workspaceServices; this.LanguageServicesFactory = WorkspaceServices.GetService<ILanguageServiceProviderFactory>(); this.TemporaryStorage = WorkspaceServices.GetService<ITemporaryStorageService>(); this.TextFactory = WorkspaceServices.GetService<ITextFactoryService>(); this.TextCache = WorkspaceServices.GetService<ITextCacheService>(); this.CompilationCacheService = WorkspaceServices.GetService<ICompilationCacheService>(); this.MetadataReferenceProvider = WorkspaceServices.GetService<IMetadataReferenceProviderService>().GetProvider(); }
public SolutionServices(Workspace workspace, IWorkspaceServiceProvider workspaceServices) { this.Workspace = workspace; this.WorkspaceServices = workspaceServices; this.LanguageServicesFactory = WorkspaceServices.GetService <ILanguageServiceProviderFactory>(); this.TemporaryStorage = WorkspaceServices.GetService <ITemporaryStorageService>(); this.TextFactory = WorkspaceServices.GetService <ITextFactoryService>(); this.TextCache = WorkspaceServices.GetService <ITextCacheService>(); this.CompilationCacheService = WorkspaceServices.GetService <ICompilationCacheService>(); this.MetadataReferenceProvider = WorkspaceServices.GetService <IMetadataReferenceProviderService>().GetProvider(); }
public TemporaryStorageService(ITextFactoryService textFactory) => _textFactory = textFactory;
public TemporaryStorageService(ITextFactoryService textFactory) { _textFactory = textFactory; }
public TemporaryStorageService(ITextFactoryService textFactory) { this.textFactory = textFactory; }
public TextFactoryFactory( ITextBufferFactoryService textBufferFactoryService, IContentTypeRegistryService contentTypeRegistryService) { _singleton = new TextBufferTextFactory(textBufferFactoryService, contentTypeRegistryService); }
public TemporaryStorageService(IWorkspaceThreadingService?workspaceThreadingService, ITextFactoryService textFactory) { _workspaceThreadingService = workspaceThreadingService; _textFactory = textFactory; }