internal override sealed void BuildTables(MetaDataOut md) { if (!(elemType is ClassDef)) elemType.BuildMDTables(md); }
internal virtual void BuildTables(MetaDataOut md) { }
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 void AddConstraints(MetaDataOut md) { for (int i=0; i < constraints.Count; i++) { md.AddToTable(MDTable.GenericParamConstraint,(GenericParamConstraint)constraints[i]); } }
internal override void BuildTables(MetaDataOut md) { if (parent is MethodRef || parent is ClassRef) return; // don't add it - fix by CK md.AddToTable(MDTable.GenericParam,this); nameIx = md.AddToStringsHeap(name); for (int i=0; i < constraints.Count; i++) { Class cClass = (Class)constraints[i]; constraints[i] = new GenericParamConstraint(this,cClass); if (cClass is ClassRef) cClass.BuildMDTables(md); // Fix by CK - should be BuildTables too?? if (cClass is ClassSpec) md.AddToTable(MDTable.TypeSpec, cClass); } }
/*------------------------- internal functions --------------------------*/ internal override sealed void BuildTables(MetaDataOut md) { md.AddToTable(tabIx,this); nameIx = md.AddToStringsHeap(name); if (type is ClassSpec) md.AddToTable(MDTable.TypeSpec, type); if (!type.isDef()) type.BuildMDTables(md); if (parent != null) { if (parent is ClassSpec) md.AddToTable(MDTable.TypeSpec,parent); parent.BuildMDTables(md); } }
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(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 void BuildTables(MetaDataOut md) { if (!(cmodType is ClassDef)) cmodType.BuildMDTables(md); if (!(type is ClassDef)) type.BuildMDTables(md); }
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 virtual uint GetBlobIndex(MetaDataOut md) { return 0; }
internal override void BuildTables(MetaDataOut md) { //md.AddToTable(MDTable.TypeSpec,this); if (!genClass.isDef()) genClass.BuildMDTables(md); for (int i=0; i < genericParams.Count; i++) { if (!((Type)genericParams[i]).isDef() && (!(genericParams[i] is GenericParam))) ((Type)genericParams[i]).BuildMDTables(md); } }
internal override void BuildSignatures(MetaDataOut md) { MemoryStream outSig = new MemoryStream(); TypeSig(outSig); sigIx = md.AddToBlobHeap(outSig.ToArray()); }
internal override sealed Type AddTypeSpec(MetaDataOut md) { md.AddToTable(MDTable.TypeSpec,this); BuildMDTables(md); return this; }
internal override sealed void BuildTables(MetaDataOut md) { md.AddToTable(MDTable.FieldLayout,this); }
internal override sealed void BuildSignatures(MetaDataOut md) { sigIx = md.AddToBlobHeap(SigBytes()); done = false; }
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(tabIx, this); }
internal override sealed void BuildTables(MetaDataOut md) { md.AddToTable(MDTable.FieldRVA,this); md.AddData(data); }
internal override sealed void BuildTables(MetaDataOut md) { md.AddToTable(MDTable.DeclSecurity, this); permissionIx = md.AddToBlobHeap(permissionSet); }
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.Event,this); nameIx = md.AddToStringsHeap(name); eventType.BuildMDTables(md); for (int i=0; i < tide; i++) { methods[i].BuildMDTables(md); } }
internal override Type AddTypeSpec(MetaDataOut md) { // check that this generic parameter belongs to the "current" method ?? GenericParTypeSpec tSpec = new GenericParTypeSpec(this); md.AddToTable(MDTable.TypeSpec,tSpec); return tSpec; }
/*----------------------------- 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.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(MDTable.Field,this); nameIx = md.AddToStringsHeap(name); if (!type.isDef()) type.BuildMDTables(md); if (initVal != null) { FieldRVA rva = new FieldRVA(this,initVal); rva.BuildMDTables(md); } if (constVal != null) { ConstantElem constElem = new ConstantElem(this,constVal); constElem.BuildMDTables(md); } if (hasOffset) { FieldLayout layout = new FieldLayout(this,offset); layout.BuildMDTables(md); } if (marshalType != null) { FieldMarshal marshalInfo = new FieldMarshal(this,marshalType); marshalInfo.BuildMDTables(md); } }
internal override sealed void BuildTables(MetaDataOut md) { md.AddToTable(MDTable.ImplMap,this); iNameIx = md.AddToStringsHeap(importName); importScope.BuildMDTables(md); }
internal override sealed void BuildTables(MetaDataOut md) { if (field == null) throw new InstructionException(IType.fieldOp,instr); if (field is FieldRef) field.BuildMDTables(md); }
internal override sealed void BuildTables(MetaDataOut md) { md.AddToTable(MDTable.InterfaceImpl,this); if (!theInterface.isDef()) theInterface.BuildMDTables(md); if (theInterface is ClassSpec) md.AddToTable(MDTable.TypeSpec,theInterface); }
internal override void BuildTables(MetaDataOut md) { if (!special) { md.AddToTable(MDTable.TypeRef,this); nameIx = md.AddToStringsHeap(name); nameSpaceIx = md.AddToStringsHeap(nameSpace); } scope.BuildMDTables(md); }