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 | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CustomPropertyImpl.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CustomPropertyImpl.cs index 9f822d5ced..63565a39b8 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CustomPropertyImpl.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CustomPropertyImpl.cs @@ -21,8 +21,8 @@ namespace System.Runtime.InteropServices.WindowsRuntime // ICustomProperty implementation - basically a wrapper of PropertyInfo // internal sealed class CustomPropertyImpl : ICustomProperty - { - private PropertyInfo m_property; + { + private PropertyInfo m_property; // // Constructor @@ -46,11 +46,11 @@ namespace System.Runtime.InteropServices.WindowsRuntime return m_property.Name; } } - + public bool CanRead { - get - { + get + { // Return false if the getter is not public return m_property.GetGetMethod() != null; } @@ -58,7 +58,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public bool CanWrite { - get + get { // Return false if the setter is not public return m_property.GetSetMethod() != null; @@ -105,21 +105,21 @@ namespace System.Runtime.InteropServices.WindowsRuntime // We get non-public accessors just so that we can throw the correct exception. MethodInfo accessor = getValue ? m_property.GetGetMethod(true) : m_property.GetSetMethod(true); - + if (accessor == null) - throw new ArgumentException(System.Environment.GetResourceString(getValue ? "Arg_GetMethNotFnd" : "Arg_SetMethNotFnd")); + throw new ArgumentException(getValue ? SR.Arg_GetMethNotFnd : SR.Arg_SetMethNotFnd); if (!accessor.IsPublic) throw new MethodAccessException( String.Format( CultureInfo.CurrentCulture, - Environment.GetResourceString("Arg_MethodAccessException_WithMethodName"), + SR.Arg_MethodAccessException_WithMethodName, accessor.ToString(), accessor.DeclaringType.FullName)); RuntimeMethodInfo rtMethod = accessor as RuntimeMethodInfo; if (rtMethod == null) - throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeMethodInfo")); + throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo); // 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. |