public CecilTypeResolveContext(ModuleDefinition module) { this.loader = new CecilLoader(); this.loader.IncludeInternalMembers = true; this.module = module; this.namespaces = module.Types.Select(t => t.Namespace).Distinct().ToArray(); List <IAttribute> assemblyAttributes = new List <IAttribute>(); foreach (var attr in module.Assembly.CustomAttributes) { assemblyAttributes.Add(loader.ReadAttribute(attr)); } this.AssemblyAttributes = assemblyAttributes.AsReadOnly(); }