Commands.Raise - метод
Выполняет указанную команду.
Пространство имен: EnvDTE
Сборка: EnvDTE (в EnvDTE.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%Обязательный. Аргументы в безопасном массиве, передаваемые в OLECommandTarget.
Примеры
' Macro code.
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
- Полное доверие для непосредственно вызывающего метода. Этот член не может быть использован частично доверенным кодом. Для получения дополнительной информации см. Использование библиотек из не вполне надежного кода.