public CorTypeSpec(CorModuleDef readerModule, uint rid, GenericParamContext gpContext) { this.readerModule = readerModule; this.rid = rid; this.origRid = rid; this.gpContext = gpContext; }
public CorParamDef(CorModuleDef readerModule, uint rid, CorMethodDef ownerMethod) { this.readerModule = readerModule; this.rid = rid; this.origRid = rid; this.ownerMethod = ownerMethod; }
public CorMethodDef(CorModuleDef readerModule, uint rid, CorTypeDef ownerType) { this.readerModule = readerModule; this.rid = rid; this.origRid = rid; this.ownerType = ownerType; this.canFreeMethodBody = true; }
public CorGenericParam(CorModuleDef readerModule, uint rid, ICorTypeOrMethodDef owner) { this.readerModule = readerModule; this.rid = rid; this.origRid = rid; this.owner = owner; }
public CorPropertyDef(CorModuleDef readerModule, uint rid, CorTypeDef ownerType) { this.readerModule = readerModule; this.rid = rid; this.origRid = rid; this.ownerType = ownerType; }
public CorModuleRef(CorModuleDef readerModule, uint rid) { this.readerModule = readerModule; this.rid = rid; this.origRid = rid; Initialize_NoLock(); }
public CorMethodSpec(CorModuleDef readerModule, uint rid, GenericParamContext gpContext) { this.readerModule = readerModule; this.rid = rid; origRid = rid; this.gpContext = gpContext; Initialize_NoLock(); }
public CorManifestResource(CorModuleDef readerModule, uint rid) { this.readerModule = readerModule; this.rid = rid; this.origRid = rid; Initialize_NoLock(); }
public CorStandAloneSig(CorModuleDef readerModule, uint rid, GenericParamContext gpContext) { this.readerModule = readerModule; this.rid = rid; this.origRid = rid; this.gpContext = gpContext; Initialize_NoLock(); }
public CorInterfaceImpl(CorModuleDef readerModule, uint rid, GenericParamContext gpContext) { this.readerModule = readerModule; this.rid = rid; this.origRid = rid; this.gpContext = gpContext; Initialize_NoLock(); }
public CorModuleDefCreatedEventArgs(DnModule module, CorModuleDef corModuleDef) { this.Module = module; this.CorModuleDef = corModuleDef; }
public CorModuleDefCreatedEventArgs(DnModule module, CorModuleDef corModuleDef) { Module = module; CorModuleDef = corModuleDef; }
LastValidRids UpdateLastValidRids(DynamicModuleData data, CorModuleDef module) { var old = data.LastValidRids; // Linear search but shouldn't be a problem except the first time if we load a big file for (; ; data.LastValidRids.TypeDefRid++) { if (!module.IsValidToken(new MDToken(Table.TypeDef, data.LastValidRids.TypeDefRid + 1).Raw)) { break; } } for (; ; data.LastValidRids.FieldRid++) { if (!module.IsValidToken(new MDToken(Table.Field, data.LastValidRids.FieldRid + 1).Raw)) { break; } } for (; ; data.LastValidRids.MethodRid++) { if (!module.IsValidToken(new MDToken(Table.Method, data.LastValidRids.MethodRid + 1).Raw)) { break; } } for (; ; data.LastValidRids.ParamRid++) { if (!module.IsValidToken(new MDToken(Table.Param, data.LastValidRids.ParamRid + 1).Raw)) { break; } } for (; ; data.LastValidRids.EventRid++) { if (!module.IsValidToken(new MDToken(Table.Event, data.LastValidRids.EventRid + 1).Raw)) { break; } } for (; ; data.LastValidRids.PropertyRid++) { if (!module.IsValidToken(new MDToken(Table.Property, data.LastValidRids.PropertyRid + 1).Raw)) { break; } } for (; ; data.LastValidRids.GenericParamRid++) { if (!module.IsValidToken(new MDToken(Table.GenericParam, data.LastValidRids.GenericParamRid + 1).Raw)) { break; } } for (; ; data.LastValidRids.GenericParamConstraintRid++) { if (!module.IsValidToken(new MDToken(Table.GenericParamConstraint, data.LastValidRids.GenericParamConstraintRid + 1).Raw)) { break; } } return(old); }
public CorExportedType(CorModuleDef readerModule, uint rid) { this.readerModule = readerModule; this.rid = rid; origRid = rid; Initialize_NoLock(); }
public CorTypeDef(CorModuleDef readerModule, uint rid) { this.readerModule = readerModule; this.rid = rid; origRid = rid; }
public CorDeclSecurity(CorModuleDef readerModule, uint rid) { this.readerModule = readerModule; this.rid = rid; origRid = rid; Initialize_NoLock(); }
internal CorAssemblyDef GetOrCreateCorAssemblyDef(DnModule module, CorModuleDef corModuleDef) { Debugger.DebugVerifyThread(); if (corAssemblyDef != null) return corAssemblyDef; // No lock needed, must be called on debugger thread Debug.Assert(module.IncrementedId == 0); Debug.Assert(module.CorModuleDef == corModuleDef); corAssemblyDef = new CorAssemblyDef(corModuleDef, 1); return corAssemblyDef; }
/// <summary> /// Returns the created module or creates one if none has been created /// </summary> /// <returns></returns> public CorModuleDef GetOrCreateCorModuleDef() { Debugger.DebugVerifyThread(); if (corModuleDef != null) return corModuleDef; // No lock needed, must be called on debugger thread corModuleDef = new CorModuleDef(CorModule.GetMetaDataInterface<IMetaDataImport>(), new CorModuleDefHelper(this)); var asm = Assembly.GetOrCreateCorAssemblyDef(this, corModuleDef); asm.Modules.Add(corModuleDef); corModuleDef.Initialize(); return corModuleDef; }