Share via


ProvideServiceOverrideAttribute Class

Definition

This attribute indicates that the package proffers a replacement for a default service. This attribute is included in the definition of a subclass of Package or a class that implements IVsPackage.

public ref class ProvideServiceOverrideAttribute sealed : Microsoft::VisualStudio::Shell::ProvideServiceAttributeBase
public ref class ProvideServiceOverrideAttribute sealed : Microsoft::VisualStudio::Shell::ProvideServiceAttributeBase
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class ProvideServiceOverrideAttribute : Microsoft.VisualStudio.Shell.ProvideServiceAttributeBase
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
type ProvideServiceOverrideAttribute = class
    inherit ProvideServiceAttributeBase
Public NotInheritable Class ProvideServiceOverrideAttribute
Inherits ProvideServiceAttributeBase
Inheritance
Attributes

Remarks

Only one replacement or override is permitted for a default service. The service defined with this attribute will be registered with the “ServiceOverrides” registry key.

Constructors

ProvideServiceOverrideAttribute(Object)

Initializes a new instance of ProvideServiceOverrideAttribute.

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)

Applies to