Udostępnij za pośrednictwem


ProvideMenuResourceAttribute Constructors

Definition

Overloads

ProvideMenuResourceAttribute(Int16, Int32)

This constructor creates a new ProvideMenuResourceAttribute object with the given resource ID and version number.

ProvideMenuResourceAttribute(String, Int32)

Initializes a new instance of ProvideMenuResourceAttribute with the specified resource ID and version.

ProvideMenuResourceAttribute(Int16, Int32)

This constructor creates a new ProvideMenuResourceAttribute object with the given resource ID and version number.

public:
 ProvideMenuResourceAttribute(short resourceID, int version);
public:
 ProvideMenuResourceAttribute(short resourceID, int version);
 ProvideMenuResourceAttribute(short resourceID, int version);
public ProvideMenuResourceAttribute (short resourceID, int version);
new Microsoft.VisualStudio.Shell.ProvideMenuResourceAttribute : int16 * int -> Microsoft.VisualStudio.Shell.ProvideMenuResourceAttribute
Public Sub New (resourceID As Short, version As Integer)

Parameters

resourceID
Int16

The ID of the menu resource. It must match the resource ID used in both the satellite (resource-only) DLL and the Command Table Configuration (.ctc) File.

version
Int32

The version number of the menu resource.

Examples

The following C# code applies the ProvideMenuResource attribute to a VSPackage named MyVSPackage.

using Microsoft.VisualStudio.VSIP;  
using MSVSIP = Microsoft.VisualStudio.VSIP;  
[MSVSIP.Helper.ProvideMenuResource(1000, 1)]  
public class MyVSPackage : MSVSIP.Helper.Package {}  

Remarks

The C# language automatically appends the word "Attribute" to the name of any attribute class. In C# code, refer to this attribute as ProvideMenuResource.

Applies to

ProvideMenuResourceAttribute(String, Int32)

Initializes a new instance of ProvideMenuResourceAttribute with the specified resource ID and version.

public:
 ProvideMenuResourceAttribute(System::String ^ resourceID, int version);
public:
 ProvideMenuResourceAttribute(Platform::String ^ resourceID, int version);
 ProvideMenuResourceAttribute(std::wstring const & resourceID, int version);
public ProvideMenuResourceAttribute (string resourceID, int version);
new Microsoft.VisualStudio.Shell.ProvideMenuResourceAttribute : string * int -> Microsoft.VisualStudio.Shell.ProvideMenuResourceAttribute
Public Sub New (resourceID As String, version As Integer)

Parameters

resourceID
String

The resource ID.

version
Int32

The version.

Applies to