Exemple #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;
 }
Exemple #2
0
 public static LocalVarMemberSig ReadLocalVar(ReaderContext ctxt, BlobReader reader)
 {
     var tag = (MemberSigTag)reader.ReadByte();
     var res = new LocalVarMemberSig { Tag = tag };
     res.ReadRest(ctxt, reader);
     return res;
 }