AddToStringsHeap() 개인적인 메소드

private AddToStringsHeap ( string str ) : uint
str string
리턴 uint
예제 #1
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 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);
     }
 }
예제 #2
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 /*------------------------- 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);
     }
 }
예제 #3
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 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);
 }
예제 #4
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 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);
     }
 }
예제 #5
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 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);
     }
 }
예제 #6
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.Method,this);
     nameIx = md.AddToStringsHeap(name);
     if (genericParams != null) {
         for (int i=0; i < genericParams.Count; i++) {
             ((GenericParam)genericParams[i]).BuildMDTables(md);
         }
     }
     if (security != null) {
         for (int i=0; i < security.Count; i++) {
             ((DeclSecurity)security[i]).BuildMDTables(md);
         }
     }
     if (pinvokeImpl != null) pinvokeImpl.BuildMDTables(md);
     if (entryPoint) md.SetEntryPoint(this);
     if (locals != null) {
         localSig = new LocalSig(locals);
         localSig.BuildMDTables(md);
     }
     try {
         if (code != null) {
             if (code.IsEmpty()) {
                 code = null;
             } else {
                 code.BuildTables(md);
             }
         }
     } catch (InstructionException ex) {
         throw new Exception(ex.AddMethodName(name));
     }
     parIx = md.TableIndex(MDTable.Param);
     for (int i=0; i < sig.numPars; i++) {
         parList[i].seqNo = (ushort)(i+1);
         parList[i].BuildMDTables(md);
     }
     sig.BuildTables(md);
 }
예제 #7
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 internal override void BuildTables(MetaDataOut md)
 {
     if (!special) {
         md.AddToTable(MDTable.TypeRef,this);
         nameIx = md.AddToStringsHeap(name);
         nameSpaceIx = md.AddToStringsHeap(nameSpace);
     }
     scope.BuildMDTables(md);
 }
예제 #8
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.Property,this);
     nameIx = md.AddToStringsHeap(name);
     for (int i=0; i < numPars; i++)
         parList[i].BuildMDTables(md);
     for (int i=0; i < tide; i++)
         methods[i].BuildMDTables(md);
     if (constVal != null) {
         ConstantElem constElem = new ConstantElem(this,constVal);
         constElem.BuildMDTables(md);
     }
 }
예제 #9
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.ExportedType,this);
     nameSpaceIx = md.AddToStringsHeap(nameSpace);
     nameIx = md.AddToStringsHeap(name);
     if (implementation is ModuleRef) {
         ModuleFile mFile = ((ModuleRef)implementation).modFile;
         mFile.BuildMDTables(md);
         implementation = mFile;
     }
 }
예제 #10
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.ModuleRef,this);
     nameIx = md.AddToStringsHeap(name);
     if (modFile != null) modFile.BuildMDTables(md);
     for (int i=0; i < exportedClasses.Count; i++)
         ((ExternClass)exportedClasses[i]).BuildMDTables(md);
 }
예제 #11
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.Param,this);
     nameIx = md.AddToStringsHeap(pName);
     if (defaultVal != null) {
         ConstantElem constElem = new ConstantElem(this,defaultVal);
         constElem.BuildMDTables(md);
     }
     if (marshalType != null) {
         FieldMarshal marshalInfo = new FieldMarshal(this,marshalType);
         marshalInfo.BuildMDTables(md);
     }
 }
예제 #12
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.Module,this);
     nameIx = md.AddToStringsHeap(name);
     mvidIx = md.AddToGUIDHeap(mvid);
     defaultClass.BuildTables(md);
     for (int i=0; i < classes.Count; i++) {
         ((Class)classes[i]).BuildMDTables(md);
     }
     for (int i=0; i < resources.Count; i++) {
         ((ManifestResource)resources[i]).BuildMDTables(md);
     }
 }
예제 #13
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.MemberRef,this);
     nameIx = md.AddToStringsHeap(name);
     if (parent != null) {
         if (parent is ClassSpec) md.AddToTable(MDTable.TypeSpec,parent);
         parent.BuildMDTables(md);
     }
     sig.BuildTables(md);
 }
예제 #14
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 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);
 }
예제 #15
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 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);
         }
     }
 }
예제 #16
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.TypeDef,this);
     //if ((flags & (uint)TypeAttr.Interface) != 0) { superType = null; }
     if (superType != null) {
         superType.BuildMDTables(md);
         if (superType is ClassSpec) md.AddToTable(MDTable.TypeSpec,superType);
     }
     for (int i=0; i < genericParams.Count; i++) {
         ((GenericParam)genericParams[i]).BuildMDTables(md);
     }
     nameIx = md.AddToStringsHeap(name);
     nameSpaceIx = md.AddToStringsHeap(nameSpace);
     if (security != null) {
         for (int i=0; i < security.Count; i++) {
             ((DeclSecurity)security[i]).BuildMDTables(md);
         }
     }
     // Console.WriteLine("Building tables for " + name);
     if (layout != null) layout.BuildMDTables(md);
     // Console.WriteLine("adding methods " + methods.Count);
     methodIx = md.TableIndex(MDTable.Method);
     for (int i=0; i < methods.Count; i++) {
         ((MethodDef)methods[i]).BuildMDTables(md);
     }
     // Console.WriteLine("adding fields");
     fieldIx = md.TableIndex(MDTable.Field);
     for (int i=0; i < fields.Count; i++) {
         ((FieldDef)fields[i]).BuildMDTables(md);
     }
     // Console.WriteLine("adding interfaceimpls and methodimpls");
     if (interfaces.Count > 0) {
         for (int i=0; i < interfaces.Count; i++) {
             ((InterfaceImpl)interfaces[i]).BuildMDTables(md);
         }
     }
     if (methodImpls.Count > 0) {
         for (int i=0; i < methodImpls.Count; i++) {
             ((MethodImpl)methodImpls[i]).BuildMDTables(md);
         }
     }
     // Console.WriteLine("adding events and properties");
     if (events.Count > 0) {
         new MapElem(this,md.TableIndex(MDTable.Event),MDTable.EventMap).BuildMDTables(md);
         for (int i=0; i < events.Count; i++) {
             ((Event)events[i]).BuildMDTables(md);
         }
     }
     if (properties.Count > 0) {
         new MapElem(this,md.TableIndex(MDTable.Property),MDTable.PropertyMap).BuildMDTables(md);
         for (int i=0; i < properties.Count; i++) {
             ((Property)properties[i]).BuildMDTables(md);
         }
     }
     // Console.WriteLine("Adding nested classes");
     if (nestedClasses.Count > 0) {
         for (int i=0; i < nestedClasses.Count; i++) {
             ClassDef nClass = (ClassDef)nestedClasses[i];
             nClass.BuildMDTables(md);
             new MapElem(nClass,this,MDTable.NestedClass).BuildTables(md);
         }
     }
     // Console.WriteLine("End of building tables");
 }
예제 #17
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.ImplMap,this);
     iNameIx = md.AddToStringsHeap(importName);
     importScope.BuildMDTables(md);
 }
예제 #18
0
파일: PERWAPI.cs 프로젝트: nomit007/f4
 /*----------------------------- internal functions ------------------------------*/
 internal override sealed void BuildTables(MetaDataOut md)
 {
     md.AddToTable(MDTable.ManifestResource,this);
     nameIx = md.AddToStringsHeap(mrName);
     if (resourceBytes != null) {
         if (impl != null)
             throw new Exception("ERROR:  Manifest Resource has byte value and file reference");
         fileOffset = md.AddResource(resourceBytes);
     } else {
         if (impl == null)
             throw new Exception("ERROR:  Manifest Resource has no implementation or value");
         impl.BuildMDTables(md);
     }
 }