ProvideServiceAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 if 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 |
Type of the service. (Inherited from ProvideServiceAttributeBase) |
ServiceName |
Name of the service (Inherited from ProvideServiceAttributeBase) |
ServiceType |
Gets the service's GUID declared in this attribute. (Inherited from ProvideServiceAttributeBase) |
TypeId |
Override the TypeID property in order to let the RegistrationAttribute derived classes to work with System.ComponentModel.TypeDescriptor.GetAttributes(...). An attribute derived from this one will have to override this property only if it needs a better control on the instances that can be applied to a class. (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) |