다음을 통해 공유


Extension Class

Definition

Base class for an extension that can host multiple service instances.

public abstract class Extension : Microsoft.VisualStudio.Extensibility.ExtensionCore, Microsoft.VisualStudio.Extensibility.IVisualStudioContributionClass
type Extension = class
    inherit ExtensionCore
    interface IVisualStudioContributionClass
Public MustInherit Class Extension
Inherits ExtensionCore
Implements IVisualStudioContributionClass
Inheritance
Extension
Implements

Remarks

The instance act as the shared instance similar to previous VSPackage concept.

Constructors

Extension()

Properties

CommandSet

Gets the extension's CommandSet.

ExtensionAssemblyVersion

Gets the assembly version of the main assembly of the extension.

(Inherited from ExtensionCore)
ExtensionConfiguration

Gets the optional configuration for this extension.

(Inherited from ExtensionCore)
HostServiceBrokerClient

Gets the service broker client instance that is associated with the host process.

(Inherited from ExtensionCore)
HostServiceProvider

Gets the service provider for host services.

(Inherited from ExtensionCore)
ResourceDictionary

Gets the resource dictionary instance that can be passed to services.

(Inherited from ExtensionCore)
ResourceManager

Gets the resource manager instance to be used for localization.

(Inherited from ExtensionCore)
ServiceFactoryMap

Gets the service factory map from moniker to factory type.

(Inherited from ExtensionCore)
ServiceProvider

Gets the service provider used for querying extension host services and local services.

(Inherited from ExtensionCore)

Methods

CreateAsync(IServiceProvider, ServiceMoniker, ServiceActivationOptions, IServiceBroker, AuthorizationServiceClient, CancellationToken) (Inherited from ExtensionCore)
Dispose() (Inherited from ExtensionCore)
Dispose(Boolean)

Disposes the object.

(Inherited from ExtensionCore)
GetFactory(ServiceMoniker)

Gets the service factory for the service moniker requested.

(Inherited from ExtensionCore)
GetServiceDescriptor(ServiceMoniker) (Inherited from ExtensionCore)
InitializeCommandsAsync(CommandSet)

Called when command set is about to be initialized. This can be used to add commands, set up initial state.

InitializeServices(IServiceCollection)

Initializes the service collection used in creating service factories.

OnInitializedAsync(VisualStudioExtensibility, CancellationToken)

Called when extension is initialized to allow for registering components asynchronously. This method will not block extension from returning services such as command sets so any initialization required for service collection should be done in InitializeServices(IServiceCollection) instead.

(Inherited from ExtensionCore)
ProfferBrokeredService(BrokeredServiceConfiguration, ServiceRpcDescriptor, ExtensionCore+ProfferedServiceFactory)

Proffers a brokered service using the configuration and provided descriptor.

(Inherited from ExtensionCore)

Applies to