public bool isGlobalType() { if (!isNested()) { return(TypeDef.IsPublic); } switch (TypeDef.Visibility) { case TypeAttributes.NestedPrivate: case TypeAttributes.NestedAssembly: case TypeAttributes.NestedFamANDAssem: return(false); case TypeAttributes.NestedPublic: case TypeAttributes.NestedFamily: case TypeAttributes.NestedFamORAssem: return(NestingType.isGlobalType()); default: return(false); } }
public bool isGlobalType() { if (!isNested()) { return(TypeDefinition.IsPublic); } var mask = TypeDefinition.Attributes & TypeAttributes.VisibilityMask; switch (mask) { case TypeAttributes.NestedPrivate: case TypeAttributes.NestedAssembly: case TypeAttributes.NestedFamANDAssem: return(false); case TypeAttributes.NestedPublic: case TypeAttributes.NestedFamily: case TypeAttributes.NestedFamORAssem: return(NestingType.isGlobalType()); default: return(false); } }