/// <summary> /// Gets the signature for this local variable. /// </summary> /// <returns>A byte array of the signature.</returns> public byte[] GetSig() { MemoryStream str = new MemoryStream(); type.TypeSig(str); return(str.ToArray()); }
/*----------------------------- internal functions ------------------------------*/ internal sealed override void BuildSignatures(MetaDataOut md) { MemoryStream sig = new MemoryStream(); sig.WriteByte(FieldTag); type.TypeSig(sig); sigIx = md.AddToBlobHeap(sig.ToArray()); done = false; }
internal sealed override void BuildSignatures(MetaDataOut md) { MemoryStream sig = new MemoryStream(); sig.WriteByte(PropertyTag); MetaDataOut.CompressNum(BlobUtil.CompressUInt(numPars), sig); returnType.TypeSig(sig); for (int i = 0; i < numPars; i++) { parList[i].BuildSignatures(md); parList[i].TypeSig(sig); } typeBlobIx = md.AddToBlobHeap(sig.ToArray()); done = false; }
internal sealed override void BuildSignatures(MetaDataOut md) { MemoryStream sig = new MemoryStream(); sig.WriteByte((byte)callConv); MetaDataOut.CompressNum(BlobUtil.CompressUInt(numPars + numOptPars), sig); retType.TypeSig(sig); for (int i = 0; i < numPars; i++) { parTypes[i].TypeSig(sig); } if (numOptPars > 0) { sig.WriteByte((byte)ElementType.Sentinel); for (int i = 0; i < numOptPars; i++) { optParTypes[i].TypeSig(sig); } } sigIx = md.AddToBlobHeap(sig.ToArray()); done = false; }
/* * internal void CheckParTypes(Param[] parList) { * //numGenPars = 0; * for (int i=0; i < numPars; i++) { * if (parTypes[i] is GenericParam) * numGenPars++; * } * if (numGenPars > 0) * callConv |= CallConv.Generic; * else if ((callConv & CallConv.Generic) > 0) * callConv ^= CallConv.Generic; * } */ internal void TypeSig(MemoryStream sig) { Contract.Requires(sig != null); sig.WriteByte((byte)callConv); if (numGenPars > 0) { MetaDataOut.CompressNum(BlobUtil.CompressUInt(numGenPars), sig); } MetaDataOut.CompressNum(BlobUtil.CompressUInt(numPars + numOptPars), sig); retType.TypeSig(sig); for (int i = 0; i < numPars; i++) { parTypes[i].TypeSig(sig); } if (numOptPars > 0) { sig.WriteByte((byte)ElementType.Sentinel); for (int i = 0; i < numOptPars; i++) { optParTypes[i].TypeSig(sig); } } }
internal sealed override void TypeSig(MemoryStream str) { str.WriteByte(typeIndex); MetaDataOut.CompressNum(BlobUtil.CompressUInt(cmodType.TypeDefOrRefToken()), str); type.TypeSig(str); }
internal sealed override void TypeSig(MemoryStream str) { str.WriteByte(typeIndex); baseType.TypeSig(str); }