private void Process(TypeSignature typeSig, Module module) { switch (typeSig.ElementCode) { case TypeElementCode.Array: { Process(typeSig.ElementType, module); } break; case TypeElementCode.ByRef: { Process(typeSig.ElementType, module); } break; case TypeElementCode.CustomModifier: { CustomModifierType modifierType; var modifier = typeSig.GetCustomModifier(out modifierType); Process(modifier, module); Process(typeSig.ElementType, module); } break; case TypeElementCode.FunctionPointer: { Process(typeSig.GetFunctionPointer(), module); } break; case TypeElementCode.GenericParameter: break; case TypeElementCode.GenericType: { Process(typeSig.DeclaringType, module); Process(typeSig.GenericArguments, module); } break; case TypeElementCode.Pinned: { Process(typeSig.ElementType, module); } break; case TypeElementCode.Pointer: { Process(typeSig.ElementType, module); } break; case TypeElementCode.DeclaringType: { var type = typeSig.Resolve(module, true).DeclaringType as BuildType; if (type != null) { UnstripAndEnqueue(type); } } break; default: throw new InvalidOperationException(); } }