You've already forked linux-packaging-mono
Imported Upstream version 4.2.1.124
Former-commit-id: 3b6a300a4ce80578c93599ba6e26a8f66743cde0
This commit is contained in:
@ -334,6 +334,9 @@ namespace Mono.Linker.Steps {
|
||||
return;
|
||||
|
||||
MarkType (et);
|
||||
if (argument.Value == null)
|
||||
return;
|
||||
|
||||
foreach (var cac in (CustomAttributeArgument[]) argument.Value)
|
||||
MarkWithResolvedScope ((TypeReference) cac.Value);
|
||||
} else if (at.Namespace == "System" && at.Name == "Type") {
|
||||
@ -355,7 +358,6 @@ namespace Mono.Linker.Steps {
|
||||
if ((git != null) && git.HasGenericArguments) {
|
||||
foreach (var ga in git.GenericArguments)
|
||||
MarkWithResolvedScope (ga);
|
||||
return;
|
||||
}
|
||||
// we cannot set the Scope of a TypeSpecification but it's element type can be set
|
||||
// e.g. System.String[] -> System.String
|
||||
|
@ -129,15 +129,24 @@ namespace Mono.Linker.Steps {
|
||||
return new Regex (pattern.Replace(".", @"\.").Replace("*", "(.*)"));
|
||||
}
|
||||
|
||||
void MatchType (TypeDefinition type, Regex regex, XPathNavigator nav)
|
||||
{
|
||||
if (regex.Match (type.FullName).Success)
|
||||
ProcessType (type, nav);
|
||||
|
||||
if (!type.HasNestedTypes)
|
||||
return;
|
||||
|
||||
foreach (var nt in type.NestedTypes)
|
||||
MatchType (nt, regex, nav);
|
||||
}
|
||||
|
||||
void ProcessTypePattern (string fullname, AssemblyDefinition assembly, XPathNavigator nav)
|
||||
{
|
||||
Regex regex = CreateRegexFromPattern (fullname);
|
||||
|
||||
foreach (TypeDefinition type in assembly.MainModule.Types) {
|
||||
if (!regex.Match (type.FullName).Success)
|
||||
continue;
|
||||
|
||||
ProcessType (type, nav);
|
||||
MatchType (type, regex, nav);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user