Inheritance: MetaData
Example #1
0
 internal override sealed void BuildTables(MetaDataOut md)
 {
     if (!(elemType is ClassDef))
         elemType.BuildMDTables(md);
 }
Example #2
0
 internal virtual void BuildTables(MetaDataOut md)
 {
 }
Example #3
0
 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;
 }
Example #4
0
 internal void AddConstraints(MetaDataOut md)
 {
     for (int i=0; i < constraints.Count; i++) {
         md.AddToTable(MDTable.GenericParamConstraint,(GenericParamConstraint)constraints[i]);
     }
 }
Example #5
0
 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);
     }
 }
Example #6
0
 /*------------------------- 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);
     }
 }
Example #7
0
 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);
 }
Example #8
0
 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);
 }
Example #9
0
 internal override sealed void BuildTables(MetaDataOut md)
 {
     if (!(cmodType is ClassDef))
         cmodType.BuildMDTables(md);
     if (!(type is ClassDef))
         type.BuildMDTables(md);
 }
Example #10
0
 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;
 }
Example #11
0
 internal virtual uint GetBlobIndex(MetaDataOut md)
 {
     return 0;
 }
Example #12
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);
     }
 }
Example #13
0
 internal override void BuildSignatures(MetaDataOut md)
 {
     MemoryStream outSig = new MemoryStream();
     TypeSig(outSig);
     sigIx = md.AddToBlobHeap(outSig.ToArray());
 }
Example #14
0
 internal override sealed Type AddTypeSpec(MetaDataOut md)
 {
     md.AddToTable(MDTable.TypeSpec,this);
     BuildMDTables(md);
     return this;
 }
Example #15
0
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.FieldLayout,this);
 }
Example #16
0
 internal override sealed void BuildSignatures(MetaDataOut md)
 {
     sigIx = md.AddToBlobHeap(SigBytes());
     done = false;
 }
Example #17
0
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.FieldMarshal,this);
     ntIx = md.AddToBlobHeap(nt.ToBlob());
 }
Example #18
0
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(tabIx, this);
 }
Example #19
0
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.FieldRVA,this);
     md.AddData(data);
 }
Example #20
0
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.DeclSecurity, this);
     permissionIx = md.AddToBlobHeap(permissionSet);
 }
Example #21
0
 internal override sealed uint GetBlobIndex(MetaDataOut md)
 {
     if (addedToBlobHeap != md) {
         blobIndex = md.AddToBlobHeap(val);
         addedToBlobHeap = md;
     }
     return blobIndex;
 }
Example #22
0
 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);
     }
 }
Example #23
0
 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;
 }
Example #24
0
 /*----------------------------- 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;
 }
Example #25
0
 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);
         }
     }
 }
Example #26
0
 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);
     }
 }
Example #27
0
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.ImplMap,this);
     iNameIx = md.AddToStringsHeap(importName);
     importScope.BuildMDTables(md);
 }
Example #28
0
 internal override sealed void BuildTables(MetaDataOut md)
 {
     if (field == null) throw new InstructionException(IType.fieldOp,instr);
     if (field is FieldRef) field.BuildMDTables(md);
 }
Example #29
0
 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);
 }
Example #30
0
 internal override void BuildTables(MetaDataOut md)
 {
     if (!special) {
         md.AddToTable(MDTable.TypeRef,this);
         nameIx = md.AddToStringsHeap(name);
         nameSpaceIx = md.AddToStringsHeap(nameSpace);
     }
     scope.BuildMDTables(md);
 }