本文整理汇总了C#中Mono.Cecil.TypeDefinition.get_NestedTypes方法的典型用法代码示例。如果您正苦于以下问题:C# TypeDefinition.get_NestedTypes方法的具体用法?C# TypeDefinition.get_NestedTypes怎么用?C# TypeDefinition.get_NestedTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Cecil.TypeDefinition
的用法示例。
在下文中一共展示了TypeDefinition.get_NestedTypes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CollectReferencedMethods
private void CollectReferencedMethods(TypeDefinition typ, HashSet<string> referencedMethods, HashSet<string> definedMethods, float progressValue)
{
this.DisplayProgress(progressValue);
using (Collection<TypeDefinition>.Enumerator enumerator = typ.get_NestedTypes().GetEnumerator())
{
// ISSUE: explicit reference operation
while (((Collection<TypeDefinition>.Enumerator) @enumerator).MoveNext())
{
// ISSUE: explicit reference operation
this.CollectReferencedMethods(((Collection<TypeDefinition>.Enumerator) @enumerator).get_Current(), referencedMethods, definedMethods, progressValue);
}
}
using (Collection<MethodDefinition>.Enumerator enumerator1 = typ.get_Methods().GetEnumerator())
{
// ISSUE: explicit reference operation
while (((Collection<MethodDefinition>.Enumerator) @enumerator1).MoveNext())
{
// ISSUE: explicit reference operation
MethodDefinition current1 = ((Collection<MethodDefinition>.Enumerator) @enumerator1).get_Current();
if (current1.get_HasBody())
{
using (Collection<Instruction>.Enumerator enumerator2 = current1.get_Body().get_Instructions().GetEnumerator())
{
// ISSUE: explicit reference operation
while (((Collection<Instruction>.Enumerator) @enumerator2).MoveNext())
{
// ISSUE: explicit reference operation
Instruction current2 = ((Collection<Instruction>.Enumerator) @enumerator2).get_Current();
if (OpCode.op_Equality((OpCode) OpCodes.Call, current2.get_OpCode()))
referencedMethods.Add(current2.get_Operand().ToString());
}
}
definedMethods.Add(((MemberReference) current1).ToString());
}
}
}
}
示例2: AddNestedTypes
private void AddNestedTypes(TypeDefinition type, Dictionary<TypeReference, TypeReference> genericInstanceTypeMap)
{
using (Collection<TypeDefinition>.Enumerator enumerator = type.get_NestedTypes().GetEnumerator())
{
// ISSUE: explicit reference operation
while (((Collection<TypeDefinition>.Enumerator) @enumerator).MoveNext())
{
// ISSUE: explicit reference operation
this.AddType((TypeReference) ((Collection<TypeDefinition>.Enumerator) @enumerator).get_Current(), genericInstanceTypeMap);
}
}
}