summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/TypedReference.cs
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
commitdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch)
treee5435159cd1bf0519276363a6fe1663d1721bed3 /src/mscorlib/src/System/TypedReference.cs
parent4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff)
downloadcoreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/mscorlib/src/System/TypedReference.cs')
-rw-r--r--src/mscorlib/src/System/TypedReference.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mscorlib/src/System/TypedReference.cs b/src/mscorlib/src/System/TypedReference.cs
index 7c68c4164f..b65652e590 100644
--- a/src/mscorlib/src/System/TypedReference.cs
+++ b/src/mscorlib/src/System/TypedReference.cs
@@ -23,13 +23,12 @@ namespace System {
private IntPtr Value;
private IntPtr Type;
- [System.Security.SecurityCritical] // auto-generated_required
[CLSCompliant(false)]
public static TypedReference MakeTypedReference(Object target, FieldInfo[] flds) {
if (target == null)
- throw new ArgumentNullException("target");
+ throw new ArgumentNullException(nameof(target));
if (flds == null)
- throw new ArgumentNullException("flds");
+ throw new ArgumentNullException(nameof(flds));
Contract.EndContractBlock();
if (flds.Length == 0)
throw new ArgumentException(Environment.GetResourceString("Arg_ArrayZeroError"));
@@ -71,7 +70,6 @@ namespace System {
return result;
}
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
// reference to TypedReference is banned, so have to pass result as pointer
private unsafe static extern void InternalMakeTypedReference(void* result, Object target, IntPtr[] flds, RuntimeType lastFieldType);
@@ -89,13 +87,11 @@ namespace System {
throw new NotSupportedException(Environment.GetResourceString("NotSupported_NYI"));
}
- [System.Security.SecuritySafeCritical] // auto-generated
public unsafe static Object ToObject(TypedReference value)
{
return InternalToObject(&value);
}
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal unsafe extern static Object InternalToObject(void * value);
@@ -118,14 +114,12 @@ namespace System {
}
// This may cause the type to be changed.
- [System.Security.SecuritySafeCritical] // auto-generated
[CLSCompliant(false)]
public unsafe static void SetTypedReference(TypedReference target, Object value)
{
InternalSetTypedReference(&target, value);
}
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal unsafe extern static void InternalSetTypedReference(void * target, Object value);
}