private static void DumpGenericParameters(MetadataTableView genericParams, MetadataRecord owner) { foreach (GenericParamDef gp in genericParams) { _output.WriteLine(" generic parameter #{0}: {1}", gp.Index, gp.Name, gp.Attributes); Debug.Assert(gp.Owner.Equals(owner)); foreach (GenericParamConstraint gpc in gp.Constraints) { _output.WriteLine(" constraint {0}", TypeToString(gpc.Constraint)); Debug.Assert(gpc.Owner.Record.Equals(gp.Record)); } if (Detailed) { DumpCustomAttributes(gp.CustomAttributes, " "); } } }
private static void DumpCustomAttributes(MetadataTableView attributes, string indent) { foreach (CustomAttributeDef ca in attributes) { _output.WriteLine("{0}custom attribute {1}({2})", indent, MethodToString(ca.Constructor), SignatureToString(ca.Value)); } }