You've already forked linux-packaging-mono
Imported Upstream version 6.12.0.122
Former-commit-id: d3ff4118f95cc6907059c6001e5157df8832a115
This commit is contained in:
parent
bb7877ea56
commit
a0d6f2d6ec
@@ -71,6 +71,7 @@ namespace Mono.Linker.Steps
|
||||
void ProcessAssembly (AssemblyDefinition assembly, XPathNodeIterator iterator)
|
||||
{
|
||||
ProcessTypes (assembly, iterator.Current.SelectChildren ("type", ""));
|
||||
ProcessResources (assembly, iterator.Current.SelectChildren ("resource", ""));
|
||||
}
|
||||
|
||||
void ProcessTypes (AssemblyDefinition assembly, XPathNodeIterator iterator)
|
||||
@@ -184,6 +185,21 @@ namespace Mono.Linker.Steps
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessResources (AssemblyDefinition assembly, XPathNodeIterator iterator)
|
||||
{
|
||||
while (iterator.MoveNext ()) {
|
||||
XPathNavigator nav = iterator.Current;
|
||||
|
||||
string name = GetAttribute (nav, "name");
|
||||
if (String.IsNullOrEmpty (name)) {
|
||||
Context.LogMessage (MessageImportance.High, $"Invalid value for 'name' attribute: '{name}'.");
|
||||
return;
|
||||
}
|
||||
|
||||
Context.Annotations.AddResourceToRemove (assembly, name);
|
||||
}
|
||||
}
|
||||
|
||||
static bool TryConvertValue (string value, TypeReference target, out object result)
|
||||
{
|
||||
switch (target.MetadataType) {
|
||||
|
||||
Reference in New Issue
Block a user