internal sealed override void TypeSig(MemoryStream str) { str.WriteByte(typeIndex); elemType.TypeSig(str); MetaDataOut.CompressNum(BlobUtil.CompressUInt(numDims), str); if ((sizes != null) && (sizes.Length > 0)) { MetaDataOut.CompressNum(BlobUtil.CompressUInt((uint)sizes.Length), str); foreach (int size in sizes) { MetaDataOut.CompressNum(BlobUtil.CompressUInt((uint)size), str); } } else { str.WriteByte(0); } if ((lowerBounds != null) && (lowerBounds.Length > 0)) { MetaDataOut.CompressNum(BlobUtil.CompressUInt((uint)lowerBounds.Length), str); foreach (int lowerBound in lowerBounds) { MetaDataOut.CompressNum(BlobUtil.CompressInt(lowerBound), str); } } else { str.WriteByte(0); } }
internal override void TypeSig(MemoryStream str) { str.WriteByte(GENERICINST); MetaDataOut.CompressNum(BlobUtil.CompressUInt((uint)instTypes.Length), str); foreach (Type instType in instTypes) { instType.TypeSig(str); } }
internal sealed override void TypeSig(MemoryStream sig) { sig.WriteByte(typeIndex); genClass.TypeSig(sig); //MetaDataOut.CompressNum((uint)genericParams.Count, sig); MetaDataOut.CompressNum(BlobUtil.CompressUInt((uint)genericParams.Count), sig); for (int i = 0; i < genericParams.Count; i++) { ((Type)genericParams[i]).TypeSig(sig); } }
internal byte[] SigBytes() { MemoryStream sig = new MemoryStream(); sig.WriteByte(LocalSigByte); MetaDataOut.CompressNum(BlobUtil.CompressUInt((uint)locals.Length), sig); foreach (Local lcl in locals) { ((Local)lcl).TypeSig(sig); } return(sig.ToArray()); }
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 override byte[] ToBlob() { MemoryStream str = new MemoryStream(); str.WriteByte(GetTypeIndex()); if (elemType == null) { str.WriteByte(0x50); // no info (MAX) } else { str.WriteByte(elemType.GetTypeIndex()); } MetaDataOut.CompressNum(BlobUtil.CompressUInt(parNum), str); MetaDataOut.CompressNum(BlobUtil.CompressUInt(elemMult), str); MetaDataOut.CompressNum(BlobUtil.CompressUInt(len), str); return(str.ToArray()); }
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 override void TypeSig(MemoryStream sig) { sig.WriteByte(typeIndex); MetaDataOut.CompressNum(BlobUtil.CompressUInt(TypeDefOrRefToken()), sig); }
internal sealed override void TypeSig(MemoryStream str) { str.WriteByte(typeIndex); MetaDataOut.CompressNum(BlobUtil.CompressUInt(cmodType.TypeDefOrRefToken()), str); type.TypeSig(str); }