IInterfaceInfo.ActiveType 属性
获取或设置作为 eInterfaceType 枚举的接口的类型。
命名空间: Microsoft.VisualStudio.VsWizard
程序集: Microsoft.VisualStudio.VsWizard(在 Microsoft.VisualStudio.VsWizard.dll 中)
语法
声明
Property ActiveType As eInterfaceType
eInterfaceType ActiveType { get; set; }
property eInterfaceType ActiveType {
eInterfaceType get ();
void set (eInterfaceType value);
}
abstract ActiveType : eInterfaceType with get, set
function get ActiveType () : eInterfaceType
function set ActiveType (value : eInterfaceType)
属性值
类型:Microsoft.VisualStudio.VsWizard.eInterfaceType
eInterfaceType 枚举。
示例
// Taken from the Visual C++ Implement Interface Wizard.
function AddImplementInterfaceCode()
{
var cInterfaces = g_aChosenInterfaces.length;
var strMethodStubs = "";
for (var iInterface = 0; iInterface < cInterfaces; iInterface++)
{
var nSource = g_aChosenSources[iInterface];
var oInterface = g_aChosenInterfaces[iInterface];
var oTypeLib = g_aChosenTypeLibs[iInterface];
if (nSource != g_nSourceCodeModel && einterfaceDual == oInterface.Type)
{
oInterface.ActiveType = einterfaceCustom;
}
AddIncludeOrImport(nSource, oInterface, oTypeLib);
AddBase(nSource, oInterface, oTypeLib);
AddMapEntry(nSource, oInterface);
strMethodStubs += GenerateMethodStubs(nSource, oInterface, oTypeLib);
}
DisambiguateMapEntries();
var oEditPoint = g_oParent.EndPointOf(vsCMPartBody, vsCMWhereDefinition).CreateEditPoint()
oEditPoint.Insert(strMethodStubs);
g_oCM.Synchronize();
g_oParent.StartPoint.CreateEditPoint().SmartFormat(g_oParent.EndPoint);
}
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。