Share via


ExtensionCore Class

Definition

Base class for an extension that can host multiple service instances. This class is intended for internal use only, extension developers should instead inherit from Microsoft.VisualStudio.Extensibility.Extension.

public abstract class ExtensionCore : IDisposable, Microsoft.ServiceHub.Framework.IMultiVersionedServiceFactory
type ExtensionCore = class
    interface IMultiVersionedServiceFactory
    interface IDisposable
Public MustInherit Class ExtensionCore
Implements IDisposable, IMultiVersionedServiceFactory
Inheritance
ExtensionCore
Derived
Implements

Remarks

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

Constructors

ExtensionCore()

Initializes a new instance of the ExtensionCore class.

Properties

ExtensionAssemblyVersion

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

ExtensionConfiguration

Gets the optional configuration for this extension.

HostServiceBrokerClient

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

HostServiceProvider

Gets the service provider for host services.

ResourceDictionary

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

ResourceManager

Gets the resource manager instance to be used for localization.

ServiceFactoryMap

Gets the service factory map from moniker to factory type.

ServiceProvider

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

Methods

CreateAsync(IServiceProvider, ServiceMoniker, ServiceActivationOptions, IServiceBroker, AuthorizationServiceClient, CancellationToken)

Creates an instance of a ServiceHub service asynchronously.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Dispose(Boolean)

Disposes the object.

GetFactory(ServiceMoniker)

Gets the service factory for the service moniker requested.

GetServiceDescriptor(ServiceMoniker)

Gets the description of a service.

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.

ProfferBrokeredService(BrokeredServiceConfiguration, ServiceRpcDescriptor, ExtensionCore+ProfferedServiceFactory)

Proffers a brokered service using the configuration and provided descriptor.

Applies to