30 internal sealed class ManifestResourceInfo
41 internal ManifestResourceInfo(
ModuleReader module,
int index)
47 public ResourceAttributes __ResourceAttributes
49 get {
return (ResourceAttributes)module.ManifestResourceTable.records[index].Flags; }
54 get {
return module.ManifestResourceTable.records[index].Offset; }
57 public ResourceLocation ResourceLocation
61 var implementation = module.ManifestResourceTable.records[index].Implementation;
64 var
asm = ReferencedAssembly;
65 if (
asm ==
null ||
asm.__IsMissing)
66 return ResourceLocation.ContainedInAnotherAssembly;
68 return asm.GetManifestResourceInfo(module.GetString(module.ManifestResourceTable.records[index].Name)).ResourceLocation | ResourceLocation.ContainedInAnotherAssembly;
70 else if ((implementation >> 24) ==
FileTable.Index)
72 if ((implementation & 0xFFFFFF) == 0)
73 return ResourceLocation.ContainedInManifestFile | ResourceLocation.Embedded;
79 throw new BadImageFormatException();
88 var implementation = module.ManifestResourceTable.records[index].Implementation;
90 return module.ResolveAssemblyRef((implementation & 0xFFFFFF) - 1);
96 public string FileName
100 var implementation = module.ManifestResourceTable.records[index].Implementation;
101 if ((implementation >> 24) ==
FileTable.Index)
103 if ((implementation & 0xFFFFFF) == 0)
106 return module.GetString(module.FileTable.records[(implementation & 0xFFFFFF) - 1].Name);
IKVM.Reflection.Assembly Assembly