Поделиться через


Commands2.Raise - метод

Выполняет указанную команду.

Пространство имен:  EnvDTE80
Сборка:  EnvDTE80 (в EnvDTE80.dll)

Синтаксис

'Декларация
Sub Raise ( _
    Guid As String, _
    ID As Integer, _
    <OutAttribute> ByRef CustomIn As Object, _
    <OutAttribute> ByRef CustomOut As Object _
)
void Raise(
    string Guid,
    int ID,
    out Object CustomIn,
    out Object CustomOut
)
void Raise(
    [InAttribute] String^ Guid, 
    [InAttribute] int ID, 
    [InAttribute] [OutAttribute] Object^% CustomIn, 
    [InAttribute] [OutAttribute] Object^% CustomOut
)
abstract Raise : 
        Guid:string * 
        ID:int * 
        CustomIn:Object byref * 
        CustomOut:Object byref -> unit
function Raise(
    Guid : String, 
    ID : int, 
    CustomIn : Object, 
    CustomOut : Object
)

Параметры

  • Guid
    Тип: String

    Обязательный. GUID команды.

  • ID
    Тип: Int32

    Обязательный. Идентификатор команды.

  • CustomIn
    Тип: Object%

    Обязательный. В параметрах для OLECommandTarget.

  • CustomOut
    Тип: Object%

    Обязательный. Параметры out для OLECommandTarget.

Примеры

Sub RaiseExample()
   ' Before running, you must add a reference to the Office 
   ' typelib to gain access to the CommandBar object.
   Dim cmds As Commands
   Dim cmdobj As Command
   Dim customin, customout As Object
   Dim colAddins As AddIns

   ' Set references.
   colAddins = DTE.AddIns()
   cmds = DTE.Commands
   cmdobj = cmds.Item("File.NewFile")

   ' Execute the File.NewFile command.
   cmds.Raise(cmdobj.Guid, cmdobj.ID, customin, customout)
End Sub

Безопасность платформы .NET Framework

См. также

Ссылки

Commands2 Интерфейс

EnvDTE80 - пространство имен