本文整理汇总了C#中ITypeNode.Create方法的典型用法代码示例。如果您正苦于以下问题:C# ITypeNode.Create方法的具体用法?C# ITypeNode.Create怎么用?C# ITypeNode.Create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITypeNode
的用法示例。
在下文中一共展示了ITypeNode.Create方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateFieldDefCommand
CreateFieldDefCommand(ITypeNode ownerNode, FieldDefOptions options) {
this.ownerNode = ownerNode;
this.fieldNode = ownerNode.Create(options.CreateFieldDef(ownerNode.TypeDef.Module));
}
示例2: CreateNestedTypeDefCommand
CreateNestedTypeDefCommand(ITypeNode ownerType, TypeDefOptions options) {
this.ownerType = ownerType;
var modNode = ownerType.GetModuleNode();
Debug.Assert(modNode != null);
if (modNode == null)
throw new InvalidOperationException();
this.nestedType = ownerType.Create(options.CreateTypeDef(modNode.DnSpyFile.ModuleDef));
}
示例3: CreateEventDefCommand
CreateEventDefCommand(ITypeNode ownerNode, EventDefOptions options) {
this.ownerNode = ownerNode;
this.eventNode = ownerNode.Create(options.CreateEventDef(ownerNode.TypeDef.Module));
}
示例4: CreatePropertyDefCommand
CreatePropertyDefCommand(ITypeNode ownerNode, PropertyDefOptions options) {
this.ownerNode = ownerNode;
this.propNode = ownerNode.Create(options.CreatePropertyDef(ownerNode.TypeDef.Module));
}
示例5: GetOrCreateNestedTypeTreeNode
static ITypeNode GetOrCreateNestedTypeTreeNode(ITypeNode typeNode, TypeDef nestedType) {
Debug.Assert(nestedType != null && nestedType.DeclaringType == typeNode.TypeDef);
typeNode.TreeNode.EnsureChildrenLoaded();
var childTypeNode = typeNode.TreeNode.DataChildren.OfType<ITypeNode>().FirstOrDefault(a => a.TypeDef == nestedType);
if (childTypeNode != null)
return childTypeNode;
childTypeNode = typeNode.Create(nestedType);
typeNode.TreeNode.AddChild(childTypeNode.TreeNode);
return childTypeNode;
}
示例6: CreateMethodDefCommand
CreateMethodDefCommand(ITypeNode ownerNode, MethodDefOptions options) {
this.ownerNode = ownerNode;
this.methodNode = ownerNode.Create(options.CreateMethodDef(ownerNode.TypeDef.Module));
}