Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
 internal MetadataNamePart(MetadataName name, int byteCount)
 {
     m_name      = name;
     m_byteCount = byteCount;
 }