Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Kanamori <AtsushiKan@users.noreply.github.com>2017-07-17 19:59:47 +0300
committerGitHub <noreply@github.com>2017-07-17 19:59:47 +0300
commit238bd67f62b58281fcb170c01f95516044eb7611 (patch)
tree23c8b5180100a30b083b2f3d1ed360695f98d3d4 /src/System.Private.TypeLoader
parent07a580824c391e99431deef6e1785a3387c77801 (diff)
Fix custom modifiers on Reflection (#4171)
- Make the guard check ModifiedType aware so it doesn't block custom modifiers on parameters. - Sort modifiers in the same way the full framework does. Order matters in custom modifiers.
Diffstat (limited to 'src/System.Private.TypeLoader')
-rw-r--r--src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MetadataReaderExtensions.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MetadataReaderExtensions.cs b/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MetadataReaderExtensions.cs
index b3705efff..772796ec9 100644
--- a/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MetadataReaderExtensions.cs
+++ b/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MetadataReaderExtensions.cs
@@ -77,6 +77,15 @@ namespace System.Reflection.Runtime.General
handleType == HandleType.TypeSpecification;
}
+ public static bool IsTypeDefRefSpecOrModifiedTypeHandle(this Handle handle, MetadataReader reader)
+ {
+ HandleType handleType = handle.HandleType;
+ return handleType == HandleType.TypeDefinition ||
+ handleType == HandleType.TypeReference ||
+ handleType == HandleType.TypeSpecification ||
+ handleType == HandleType.ModifiedType;
+ }
+
public static RuntimeAssemblyName ToRuntimeAssemblyName(this ScopeDefinitionHandle scopeDefinitionHandle, MetadataReader reader)
{
ScopeDefinition scopeDefinition = scopeDefinitionHandle.GetScopeDefinition(reader);