Esempio n. 1
0
 public static MemberSig Read(ReaderContext ctxt, BlobReader reader)
 {
     var tag = (MemberSigTag)reader.ReadByte();
     var res = default(MemberSig);
     switch (tag & MemberSigTag.MASK)
     {
         case MemberSigTag.FIELD:
             res = new FieldMemberSig();
             break;
         case MemberSigTag.PROPERTY:
             res = new PropertyMemberSig { Tag = tag };
             break;
         case MemberSigTag.LOCAL_SIG:
             res = new LocalVarMemberSig();
             break;
         case MemberSigTag.GENERICINST:
             res = new MethodSpecMemberSig();
             break;
         default:
             res = new MethodMemberSig { Tag = tag };
             break;
     }
     res.ReadRest(ctxt, reader);
     return res;
 }
Esempio n. 2
0
 public static FieldMemberSig ReadField(ReaderContext ctxt, BlobReader reader)
 {
     var tag = (MemberSigTag)reader.ReadByte();
     var res = new FieldMemberSig { Tag = tag };
     res.ReadRest(ctxt, reader);
     return res;
 }