ProvideServiceAttribute Class

Definition

This attribute indicates that the package proffers a service when applied to a subclass of Package or a class that implements 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
Inheritance
Attributes

Remarks

The service defined with this attribute will be registered under the “Services” registry key.

Constructors

ProvideServiceAttribute(Object)

Initializes a new instance of ProvideServiceAttribute.

Properties

IsAsyncQueryable

Deterimines whether the service supports being retrieved via the async service provider.

(Inherited from ProvideServiceAttributeBase)
IsCacheable

Indicates to the shell service layer that it may cache the service. This is more of a formality for MPF provided services because MPF itself caches the service so your service creation callback is never called more than once. This will provide a slight performance improvement by eliminating a native -> managed transition on service request. If you have no compelling reason to set this to false, this should be set to true. Future versions may default this to true.

(Inherited from ProvideServiceAttributeBase)
IsFreeThreaded

Deterimines if the service supports being retrieved and used from any thread.

(Inherited from ProvideServiceAttributeBase)
Service

Gets the type of the service.

(Inherited from ProvideServiceAttributeBase)
ServiceName

Gets or sets the name of the service.

(Inherited from ProvideServiceAttributeBase)
ServiceType

Gets the service's GUID declared in this attribute.

(Inherited from ProvideServiceAttributeBase)
TypeId

Gets the current instance of this attribute.

(Inherited from RegistrationAttribute)

Methods

GetPackageRegKeyPath(Guid)

Gets the registry path (relative to the registry root of the application) of the VSPackage.

(Inherited from RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

Registers this attribute with the given context.

(Inherited from ProvideServiceAttributeBase)
Unregister(RegistrationAttribute+RegistrationContext)

Unregisters this attribute.

(Inherited from ProvideServiceAttributeBase)

Applies to