internal override sealed uint GetBlobIndex(MetaDataOut md) { if (addedToBlobHeap != md) { blobIndex = md.AddToBlobHeap(val); addedToBlobHeap = md; } return blobIndex; }
internal override sealed void BuildTables(MetaDataOut md) { md.AddToTable(MDTable.FieldMarshal,this); ntIx = md.AddToBlobHeap(nt.ToBlob()); }
internal override sealed void BuildTables(MetaDataOut md) { md.AddToTable(MDTable.File,this); nameIx = md.AddToStringsHeap(name); hashIx = md.AddToBlobHeap(hashBytes); if (entryPoint) md.SetEntryPoint(this); }
internal override sealed void BuildTables(MetaDataOut md) { md.AddToTable(MDTable.DeclSecurity, this); permissionIx = md.AddToBlobHeap(permissionSet); }
/*----------------------------- internal functions ------------------------------*/ internal override sealed void BuildSignatures(MetaDataOut md) { MemoryStream sig = new MemoryStream(); sig.WriteByte(FieldTag); type.TypeSig(sig); sigIx = md.AddToBlobHeap(sig.ToArray()); done = false; }
internal override sealed void BuildTables(MetaDataOut md) { md.AddToTable(MDTable.AssemblyRef,this); keyIx = md.AddToBlobHeap(keyBytes); nameIx = md.AddToStringsHeap(name); cultIx = md.AddToStringsHeap(culture); hashIx = md.AddToBlobHeap(hashBytes); }
internal override sealed void BuildSignatures(MetaDataOut md) { sigIx = md.AddToBlobHeap(SigBytes()); done = false; }
internal override void BuildSignatures(MetaDataOut md) { MemoryStream outSig = new MemoryStream(); TypeSig(outSig); sigIx = md.AddToBlobHeap(outSig.ToArray()); }
internal override sealed uint GetBlobIndex(MetaDataOut md) { if (addedToBlobHeap != md) { MemoryStream str = new MemoryStream(); BinaryWriter bw = new BinaryWriter(str); Write(bw); blobIndex = md.AddToBlobHeap(str.ToArray()); addedToBlobHeap = md; } return blobIndex; }
internal override sealed uint GetBlobIndex(MetaDataOut md) { if (addedToBlobHeap != md) { if (val == null) blobIndex = md.AddToBlobHeap(strBytes); else blobIndex = md.AddToBlobHeap(val); addedToBlobHeap = md; } return blobIndex; }
internal override void BuildSignatures(MetaDataOut md) { MemoryStream str = new MemoryStream(); TypeSig(str); sigIx = md.AddToBlobHeap(str.ToArray()); done = false; }
internal override sealed void BuildSignatures(MetaDataOut md) { MemoryStream sig = new MemoryStream(); sig.WriteByte((byte)callConv); MetaDataOut.CompressNum(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 override sealed void BuildSignatures(MetaDataOut md) { MemoryStream sig = new MemoryStream(); sig.WriteByte(PropertyTag); MetaDataOut.CompressNum(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 sealed void BuildSignatures(MetaDataOut md) { sig.BuildSignatures(md); MemoryStream sigStream = new MemoryStream(); TypeSig(sigStream); sigIx = md.AddToBlobHeap(sigStream.ToArray()); done = false; }
internal override sealed void BuildTables(MetaDataOut md) { md.AddToTable(MDTable.Assembly,this); nameIx = md.AddToStringsHeap(name); cultIx = md.AddToStringsHeap(culture); keyIx = md.AddToBlobHeap(publicKey); if (security != null) { for (int i=0; i < security.Count; i++) { ((DeclSecurity)security[i]).BuildMDTables(md); } } }
internal override sealed void BuildTables(MetaDataOut md) { md.AddToTable(tabIx,this); type.BuildMDTables(md); // more adding to tables if data is not bytes if (changed || (byteVal == null)) { MemoryStream str = new MemoryStream(); BinaryWriter bw = new BinaryWriter(str); bw.Write((ushort)1); if (argVals != null) { for (int i=0; i < argVals.Length; i++) { argVals[i].Write(bw); } } bw.Write(numNamed); for (int i=0; i < numNamed; i++) { if (isField[i]) bw.Write(Field.FieldTag); else bw.Write(Property.PropertyTag); bw.Write(vals[i].GetTypeIndex()); bw.Write(names[i]); // check this is the right format!!! vals[i].Write(bw); } byteVal = str.ToArray(); } valIx = md.AddToBlobHeap(byteVal); }
internal override sealed uint GetBlobIndex(MetaDataOut md) { if (addedToBlobHeap != md) { blobIndex = md.AddToBlobHeap(val,size); //switch (size) { // case (1) : md.AddToBlobHeap((sbyte)val); break; // case (2) : md.AddToBlobHeap((short)val); break; // case (4) : md.AddToBlobHeap((int)val); break; // default : md.AddToBlobHeap(val); break; //} addedToBlobHeap = md; } return blobIndex; }
internal override sealed void BuildSignatures(MetaDataOut md) { if (locals != null) { localSig.BuildSignatures(md); locToken = localSig.Token(); } if (code != null) { // If the stack depth has not been explicity set, try to work out what is needed. if (maxStack == 0) { try { // Set the flag to show if the return type is void or other. code.ReturnsVoid = GetRetType().SameType(PrimitiveType.Void); // Calculate the max stack depth maxStack = code.GetMaxStackDepthRequired(); } catch (CouldNotFindMaxStackDepth) { // Could not find the depth, assign the default maxStack = DefaultMaxStackDepth; } } code.CheckCode(locToken,initLocals,maxStack,md); textOffset = md.AddCode(code); if (Diag.DiagOn) Console.WriteLine("code offset = " + textOffset); } sig.BuildSignatures(md); MemoryStream outSig = new MemoryStream(); TypeSig(outSig); sigIx = md.AddToBlobHeap(outSig.ToArray()); done = false; }