Share via


ProvideServiceAttribute クラス

定義

この属性は、 のサブクラス Package または を実装するクラスに適用されるときに、パッケージがサービスを提供することを示します IVsPackage

public ref class ProvideServiceAttribute sealed : Microsoft::VisualStudio::Shell::ProvideServiceAttributeBase
public ref class ProvideServiceAttribute sealed : Microsoft::VisualStudio::Shell::ProvideServiceAttributeBase
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class ProvideServiceAttribute : Microsoft.VisualStudio.Shell.ProvideServiceAttributeBase
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
type ProvideServiceAttribute = class
    inherit ProvideServiceAttributeBase
Public NotInheritable Class ProvideServiceAttribute
Inherits ProvideServiceAttributeBase
継承
属性

注釈

この属性で定義されたサービスは、"サービス" レジストリ キーの下に登録されます。

コンストラクター

ProvideServiceAttribute(Object)

ProvideServiceAttribute の新しいインスタンスを初期化します。

プロパティ

IsAsyncQueryable

サービスが非同期サービス プロバイダーを介した取得をサポートしている場合は、デターミネス。

(継承元 ProvideServiceAttributeBase)
IsCacheable

サービスをキャッシュする可能性があることをシェル サービス レイヤーに示します。 これは、MPF 自体がサービスをキャッシュするため、サービス作成コールバックが複数回呼び出されないため、MPF が提供するサービスの形式です。 これにより、サービス要求のネイティブマネージド> 移行を排除することで、パフォーマンスが若干向上します。 これを false に設定する説得力のある理由がない場合は、これを true に設定する必要があります。 将来のバージョンでは、これが既定で true に設定される場合があります。

(継承元 ProvideServiceAttributeBase)
IsFreeThreaded

サービスが任意のスレッドからの取得と使用をサポートしている場合は、デチミネス。

(継承元 ProvideServiceAttributeBase)
Service

サービスの種類。

(継承元 ProvideServiceAttributeBase)
ServiceName

サービスの名前

(継承元 ProvideServiceAttributeBase)
ServiceType

この属性で宣言されているサービスの GUID を取得します。

(継承元 ProvideServiceAttributeBase)
TypeId

RegistrationAttribute 派生クラスが System.ComponentModel.TypeDescriptor.GetAttributes(...) と連携できるように、TypeID プロパティをオーバーライドします。このプロパティから派生した属性は、クラスに適用できるインスタンスをより適切に制御する必要がある場合にのみ、このプロパティをオーバーライドする必要があります。

(継承元 RegistrationAttribute)

メソッド

GetPackageRegKeyPath(Guid)

VSPackage のレジストリ パス (アプリケーションのレジストリ ルートに対する相対パス) を取得します。

(継承元 RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

この属性を指定されたコンテキストに登録します。

(継承元 ProvideServiceAttributeBase)
Unregister(RegistrationAttribute+RegistrationContext)

この属性の登録を解除します。

(継承元 ProvideServiceAttributeBase)

適用対象