protected virtual void SweepType(TypeDefinition type) { if (type.HasFields) { SweepCollectionWithCustomAttributes(type.Fields); } if (type.HasMethods) { SweepMethods(type.Methods); } if (type.HasNestedTypes) { SweepNestedTypes(type); } if (type.HasInterfaces) { SweepInterfaces(type); } if (type.HasCustomAttributes) { SweepCustomAttributes(type); } if (type.HasGenericParameters) { SweepGenericParameters(type.GenericParameters); } if (type.HasProperties) { SweepCustomAttributeCollection(type.Properties); } if (type.HasEvents) { SweepCustomAttributeCollection(type.Events); } if (type.HasFields && !type.IsBeforeFieldInit && !Annotations.HasPreservedStaticCtor(type) && !type.IsEnum) { type.IsBeforeFieldInit = true; } }