public unsafe bool Equals(MetadataName other) { bool result = MetadataName.Equals(other.m_data, m_name.m_data, m_byteCount); GC.KeepAlive(m_name.m_keepAlive); GC.KeepAlive(other.m_keepAlive); return(result); }
private static void GetName(CustomAttributeDef ca, out MetadataName name, out MetadataName @namespace) { var ctor = ca.Constructor; if (ctor.IsMemberRef) { var cls = ctor.MemberRef.Class; if (cls.IsTypeRef) { name = cls.TypeRef.TypeName; @namespace = cls.TypeRef.TypeNamespace; } else { name = cls.TypeDef.Name; @namespace = cls.TypeDef.Namespace; } } else { var ctorDef = ctor.MethodDef; TypeDef typeDef = ctorDef.FindDeclaringType(); name = typeDef.Name; @namespace = typeDef.Namespace; } }
internal MetadataNamePart(MetadataName name, int byteCount) { m_name = name; m_byteCount = byteCount; }