Proprietà IInterfaceInfo.IsDispatchable
Ottiene un valore che indica se l'interfaccia deriva a IDispatch.
Spazio dei nomi: Microsoft.VisualStudio.VsWizard
Assembly: Microsoft.VisualStudio.VsWizard (in Microsoft.VisualStudio.VsWizard.dll)
Sintassi
'Dichiarazione
ReadOnly Property IsDispatchable As Boolean
bool IsDispatchable { get; }
property bool IsDispatchable {
bool get ();
}
abstract IsDispatchable : bool with get
function get IsDispatchable () : boolean
Valore proprietà
Tipo: Boolean
true se l'interfaccia deriva da IDispatch; in caso contrario, false.
Esempi
// From the Visual C++ Implement Interface wizard
function IsCustomInterface(nSource, oInterface)
{
if (nSource == g_nSourceCodeModel)
{
var oBases = oInterface.Bases;
var cBases = oBases.Count;
if (!cBases)
{
return false;
}
else
{
oBase = oBases.Item(1);
if (oBase.Name == "IDispatch")
{
return false;
}
else
{
var oBaseInterface = oBase.Class;
if (oBaseInterface)
{
return IsCustomInterface(nSource, oBaseInterface);
}
}
}
}
else
{
return oInterface.Type == einterfaceCustom && oInterface.IsDispatchable == false;
}
}
Sicurezza di .NET Framework
- Attendibilità totale per il chiamante immediato. Impossibile utilizzare questo membro in codice parzialmente attendibile. Per altre informazioni, vedere Utilizzo di librerie da codice parzialmente attendibile.