SolutionServices.GetService<TWorkspaceService> Method

Definition

Gets a workspace specific service provided by the host identified by the service type. If the host does not provide the service, this method returns null.

C#
public TWorkspaceService? GetService<TWorkspaceService>() where TWorkspaceService : Microsoft.CodeAnalysis.Host.IWorkspaceService;

Type Parameters

TWorkspaceService

Returns

TWorkspaceService

Applies to

Ürün Sürümler
Roslyn 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.2, 4.12.2, 4.13.0