diff options
Diffstat (limited to 'src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CustomPropertyImpl.cs')
-rw-r--r-- | src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CustomPropertyImpl.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CustomPropertyImpl.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CustomPropertyImpl.cs index 04fe1bf9b2..d575201bb9 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CustomPropertyImpl.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CustomPropertyImpl.cs @@ -7,6 +7,7 @@ using System; using System.Security; using System.Reflection; +using System.Diagnostics; using System.Diagnostics.Contracts; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; @@ -29,7 +30,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public CustomPropertyImpl(PropertyInfo propertyInfo) { if (propertyInfo == null) - throw new ArgumentNullException("propertyInfo"); + throw new ArgumentNullException(nameof(propertyInfo)); m_property = propertyInfo; } @@ -88,7 +89,6 @@ namespace System.Runtime.InteropServices.WindowsRuntime InvokeInternal(target, new object[] { indexValue, value }, false); } - [SecuritySafeCritical] private object InvokeInternal(object target, object[] args, bool getValue) { // Forward to the right object if we are dealing with a proxy @@ -123,7 +123,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime // We can safely skip access check because this is only used in full trust scenarios. // And we have already verified that the property accessor is public. - Contract.Assert(AppDomain.CurrentDomain.PermissionSet.IsUnrestricted()); + Debug.Assert(AppDomain.CurrentDomain.PermissionSet.IsUnrestricted()); return rtMethod.UnsafeInvoke(target, BindingFlags.Default, null, args, null); } |