summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Reflection/Associates.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Reflection/Associates.cs')
-rw-r--r--src/mscorlib/src/System/Reflection/Associates.cs35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/mscorlib/src/System/Reflection/Associates.cs b/src/mscorlib/src/System/Reflection/Associates.cs
index 9eaf74a6e9..ed06cb46fc 100644
--- a/src/mscorlib/src/System/Reflection/Associates.cs
+++ b/src/mscorlib/src/System/Reflection/Associates.cs
@@ -4,22 +4,22 @@
//
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.Contracts;
+
namespace System.Reflection
{
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Diagnostics.Contracts;
-
internal static class Associates
{
[Flags]
internal enum Attributes
{
ComposedOfAllVirtualMethods = 0x1,
- ComposedOfAllPrivateMethods = 0x2,
- ComposedOfNoPublicMembers = 0x4,
- ComposedOfNoStaticMembers = 0x8,
+ ComposedOfAllPrivateMethods = 0x2,
+ ComposedOfNoPublicMembers = 0x4,
+ ComposedOfNoStaticMembers = 0x8,
}
internal static bool IncludeAccessor(MethodInfo associate, bool nonPublic)
@@ -51,7 +51,7 @@ namespace System.Reflection
IntPtr[] genericArgumentHandles = null;
int genericArgumentCount = 0;
- RuntimeType [] genericArguments = declaredType.GetTypeHandleInternal().GetInstantiationInternal();
+ RuntimeType[] genericArguments = declaredType.GetTypeHandleInternal().GetInstantiationInternal();
if (genericArguments != null)
{
genericArgumentCount = genericArguments.Length;
@@ -85,7 +85,7 @@ namespace System.Reflection
// the same or any property in the derived class.
if ((methAttr & MethodAttributes.Virtual) != 0)
{
- bool declaringTypeIsClass =
+ bool declaringTypeIsClass =
(RuntimeTypeHandle.GetAttributes(declaredType) & TypeAttributes.ClassSemanticsMask) == TypeAttributes.Class;
// It makes no sense to search for a virtual override of a method declared on an interface.
@@ -99,7 +99,7 @@ namespace System.Reflection
}
}
- RuntimeMethodInfo associateMethod =
+ RuntimeMethodInfo associateMethod =
RuntimeType.GetMethodBase(reflectedType, associateMethodHandle) as RuntimeMethodInfo;
// suppose a property was mapped to a method not in the derivation hierarchy of the reflectedTypeHandle
@@ -125,13 +125,13 @@ namespace System.Reflection
{
addOn = removeOn = fireOn = getter = setter = null;
- Attributes attributes =
+ Attributes attributes =
Attributes.ComposedOfAllPrivateMethods |
Attributes.ComposedOfAllVirtualMethods |
Attributes.ComposedOfNoPublicMembers |
Attributes.ComposedOfNoStaticMembers;
- while(RuntimeTypeHandle.IsGenericVariable(reflectedType))
+ while (RuntimeTypeHandle.IsGenericVariable(reflectedType))
reflectedType = (RuntimeType)reflectedType.BaseType;
bool isInherited = declaringType != reflectedType;
@@ -156,12 +156,12 @@ namespace System.Reflection
continue;
MethodAttributes methAttr = associateMethod.Attributes;
- bool isPrivate =(methAttr & MethodAttributes.MemberAccessMask) == MethodAttributes.Private;
- bool isVirtual =(methAttr & MethodAttributes.Virtual) != 0;
+ bool isPrivate = (methAttr & MethodAttributes.MemberAccessMask) == MethodAttributes.Private;
+ bool isVirtual = (methAttr & MethodAttributes.Virtual) != 0;
MethodAttributes visibility = methAttr & MethodAttributes.MemberAccessMask;
bool isPublic = visibility == MethodAttributes.Public;
- bool isStatic =(methAttr & MethodAttributes.Static) != 0;
+ bool isStatic = (methAttr & MethodAttributes.Static) != 0;
if (isPublic)
{
@@ -202,10 +202,9 @@ namespace System.Reflection
bool isPseudoStatic = (attributes & Attributes.ComposedOfNoStaticMembers) == 0;
bindingFlags = RuntimeType.FilterPreCalculate(isPseudoPublic, isInherited, isPseudoStatic);
- composedOfAllPrivateMethods =(attributes & Attributes.ComposedOfAllPrivateMethods) != 0;
+ composedOfAllPrivateMethods = (attributes & Attributes.ComposedOfAllPrivateMethods) != 0;
other = (otherList != null) ? otherList.ToArray() : null;
}
}
-
}