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; }
public static PropertyMemberSig ReadProperty(ReaderContext ctxt, BlobReader reader) { var tag = (MemberSigTag)reader.ReadByte(); var res = new PropertyMemberSig { Tag = tag }; res.ReadRest(ctxt, reader); return res; }