다음을 통해 공유


HostLanguageServices Class

Definition

Per-language services provided by the host environment.

public ref class HostLanguageServices abstract
public abstract class HostLanguageServices
public abstract class HostLanguageServices : IDisposable
type HostLanguageServices = class
type HostLanguageServices = class
    interface IDisposable
Public MustInherit Class HostLanguageServices
Public MustInherit Class HostLanguageServices
Implements IDisposable
Inheritance
HostLanguageServices
Implements

Remarks

Language services which implement IDisposable are considered ownable, in which case the owner is responsible for disposing of owned instances when they are no longer in use. The ownership rules are described in detail for HostWorkspaceServices. Instances of ILanguageService have the same ownership rules as IWorkspaceService, and instances of ILanguageServiceFactory have the same ownership rules as IWorkspaceServiceFactory.

Constructors

HostLanguageServices()

Properties

Language

The name of the language

LanguageServices

Immutable snapshot of the host services. Preferable to use instead of this HostLanguageServices when possible.

WorkspaceServices

The HostWorkspaceServices that originated this language service.

Methods

Dispose()
GetRequiredService<TLanguageService>()

Gets a language specific service provided by the host identified by the service type. If the host does not provide the service, this method returns throws InvalidOperationException.

GetService<TLanguageService>()

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

Applies to