Example #1
0
 public CorTypeSpec(CorModuleDef readerModule, uint rid, GenericParamContext gpContext)
 {
     this.readerModule = readerModule;
     this.rid = rid;
     this.origRid = rid;
     this.gpContext = gpContext;
 }
Example #2
0
 public CorParamDef(CorModuleDef readerModule, uint rid, CorMethodDef ownerMethod)
 {
     this.readerModule = readerModule;
     this.rid = rid;
     this.origRid = rid;
     this.ownerMethod = ownerMethod;
 }
Example #3
0
		public CorMethodDef(CorModuleDef readerModule, uint rid, CorTypeDef ownerType) {
			this.readerModule = readerModule;
			this.rid = rid;
			this.origRid = rid;
			this.ownerType = ownerType;
			this.canFreeMethodBody = true;
		}
Example #4
0
 public CorGenericParam(CorModuleDef readerModule, uint rid, ICorTypeOrMethodDef owner)
 {
     this.readerModule = readerModule;
     this.rid = rid;
     this.origRid = rid;
     this.owner = owner;
 }
Example #5
0
 public CorPropertyDef(CorModuleDef readerModule, uint rid, CorTypeDef ownerType)
 {
     this.readerModule = readerModule;
     this.rid = rid;
     this.origRid = rid;
     this.ownerType = ownerType;
 }
Example #6
0
 public CorModuleRef(CorModuleDef readerModule, uint rid)
 {
     this.readerModule = readerModule;
     this.rid = rid;
     this.origRid = rid;
     Initialize_NoLock();
 }
Example #7
0
		public CorMethodSpec(CorModuleDef readerModule, uint rid, GenericParamContext gpContext) {
			this.readerModule = readerModule;
			this.rid = rid;
			origRid = rid;
			this.gpContext = gpContext;
			Initialize_NoLock();
		}
Example #8
0
 public CorManifestResource(CorModuleDef readerModule, uint rid)
 {
     this.readerModule = readerModule;
     this.rid = rid;
     this.origRid = rid;
     Initialize_NoLock();
 }
Example #9
0
		public CorStandAloneSig(CorModuleDef readerModule, uint rid, GenericParamContext gpContext) {
			this.readerModule = readerModule;
			this.rid = rid;
			this.origRid = rid;
			this.gpContext = gpContext;
			Initialize_NoLock();
		}
Example #10
0
		public CorInterfaceImpl(CorModuleDef readerModule, uint rid, GenericParamContext gpContext) {
			this.readerModule = readerModule;
			this.rid = rid;
			this.origRid = rid;
			this.gpContext = gpContext;
			Initialize_NoLock();
		}
Example #11
0
		public CorModuleDefCreatedEventArgs(DnModule module, CorModuleDef corModuleDef) {
			this.Module = module;
			this.CorModuleDef = corModuleDef;
		}
Example #12
0
 public CorModuleDefCreatedEventArgs(DnModule module, CorModuleDef corModuleDef)
 {
     this.Module       = module;
     this.CorModuleDef = corModuleDef;
 }
Example #13
0
 public CorModuleDefCreatedEventArgs(DnModule module, CorModuleDef corModuleDef)
 {
     Module       = module;
     CorModuleDef = corModuleDef;
 }
Example #14
0
        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);
        }
Example #15
0
		public CorExportedType(CorModuleDef readerModule, uint rid) {
			this.readerModule = readerModule;
			this.rid = rid;
			origRid = rid;
			Initialize_NoLock();
		}
Example #16
0
 public CorTypeDef(CorModuleDef readerModule, uint rid)
 {
     this.readerModule = readerModule;
     this.rid          = rid;
     origRid           = rid;
 }
Example #17
0
		public CorDeclSecurity(CorModuleDef readerModule, uint rid) {
			this.readerModule = readerModule;
			this.rid = rid;
			origRid = rid;
			Initialize_NoLock();
		}
Example #18
0
		public CorModuleDefCreatedEventArgs(DnModule module, CorModuleDef corModuleDef) {
			Module = module;
			CorModuleDef = corModuleDef;
		}
Example #19
0
        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;
        }
Example #20
0
		public CorTypeDef(CorModuleDef readerModule, uint rid) {
			this.readerModule = readerModule;
			this.rid = rid;
			origRid = rid;
		}
Example #21
0
        /// <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;
        }