OleMenuCommandService Constructors

Definition

Overloads

OleMenuCommandService(IServiceProvider)

Creates a new menu command service.

OleMenuCommandService(IServiceProvider, IOleCommandTarget)

Creates a new menu command service.

OleMenuCommandService(IServiceProvider)

Creates a new menu command service.

public:
 OleMenuCommandService(IServiceProvider ^ serviceProvider);
public OleMenuCommandService (IServiceProvider serviceProvider);
new Microsoft.VisualStudio.Shell.OleMenuCommandService : IServiceProvider -> Microsoft.VisualStudio.Shell.OleMenuCommandService
Public Sub New (serviceProvider As IServiceProvider)

Parameters

serviceProvider
IServiceProvider

The service provider that this service uses to obtain other services. If the service is being used with a designer, this should be the service provider for the designer (such as the DesignSurface instance).

Applies to

OleMenuCommandService(IServiceProvider, IOleCommandTarget)

Creates a new menu command service.

public:
 OleMenuCommandService(IServiceProvider ^ serviceProvider, Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget ^ parentCommandTarget);
public OleMenuCommandService (IServiceProvider serviceProvider, Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget parentCommandTarget);
new Microsoft.VisualStudio.Shell.OleMenuCommandService : IServiceProvider * Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget -> Microsoft.VisualStudio.Shell.OleMenuCommandService
Public Sub New (serviceProvider As IServiceProvider, parentCommandTarget As IOleCommandTarget)

Parameters

serviceProvider
IServiceProvider

The service provider that this service uses to obtain other services. If the service is being used with a designer, this should be the service provider for the designer (such as the DesignSurface instance).

parentCommandTarget
IOleCommandTarget

Allows the service to defer command searching to a parent IOleCommandTarget if the command is not found in this object.

Exceptions

Throws an ArgumentNullException if parentCommandTarget is null.

Applies to