summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Delegate.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Delegate.cs')
-rw-r--r--src/mscorlib/src/System/Delegate.cs32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/mscorlib/src/System/Delegate.cs b/src/mscorlib/src/System/Delegate.cs
index 347607f6f5..f0961ecf9e 100644
--- a/src/mscorlib/src/System/Delegate.cs
+++ b/src/mscorlib/src/System/Delegate.cs
@@ -20,29 +20,24 @@ namespace System {
public abstract class Delegate : ICloneable, ISerializable
{
// _target is the object we will invoke on
- [System.Security.SecurityCritical]
internal Object _target;
// MethodBase, either cached after first request or assigned from a DynamicMethod
// For open delegates to collectible types, this may be a LoaderAllocator object
- [System.Security.SecurityCritical]
internal Object _methodBase;
// _methodPtr is a pointer to the method we will invoke
// It could be a small thunk if this is a static or UM call
- [System.Security.SecurityCritical]
internal IntPtr _methodPtr;
// In the case of a static method passed to a delegate, this field stores
// whatever _methodPtr would have stored: and _methodPtr points to a
// small thunk which removes the "this" pointer before going on
// to _methodPtrAux.
- [System.Security.SecurityCritical]
internal IntPtr _methodPtrAux;
// This constructor is called from the class generated by the
// compiler generated code
- [System.Security.SecuritySafeCritical] // auto-generated
protected Delegate(Object target,String method)
{
if (target == null)
@@ -67,7 +62,6 @@ namespace System {
// This constructor is called from a class to generate a
// delegate based upon a static method name and the Type object
// for the class defining the method.
- [System.Security.SecuritySafeCritical] // auto-generated
protected unsafe Delegate(Type target,String method)
{
if (target == null)
@@ -113,7 +107,6 @@ namespace System {
return DynamicInvokeImpl(args);
}
- [System.Security.SecuritySafeCritical] // auto-generated
protected virtual object DynamicInvokeImpl(object[] args)
{
RuntimeMethodHandleInternal method = new RuntimeMethodHandleInternal(GetInvokeMethod());
@@ -123,7 +116,6 @@ namespace System {
}
- [System.Security.SecuritySafeCritical] // auto-generated
public override bool Equals(Object obj)
{
if (obj == null || !InternalEqualTypes(this, obj))
@@ -227,7 +219,6 @@ namespace System {
}
}
- [System.Security.SecuritySafeCritical] // auto-generated
protected virtual MethodInfo GetMethodImpl()
{
if ((_methodBase == null) || !(_methodBase is MethodInfo))
@@ -292,7 +283,6 @@ namespace System {
}
- [System.Security.SecuritySafeCritical] // auto-generated
public static Delegate Remove(Delegate source, Delegate value)
{
if (source == null)
@@ -350,7 +340,6 @@ namespace System {
}
// V1 API.
- [System.Security.SecuritySafeCritical] // auto-generated
public static Delegate CreateDelegate(Type type, Object target, String method, bool ignoreCase, bool throwOnBindFailure)
{
if (type == null)
@@ -402,7 +391,6 @@ namespace System {
}
// V1 API.
- [System.Security.SecuritySafeCritical] // auto-generated
public static Delegate CreateDelegate(Type type, Type target, String method, bool ignoreCase, bool throwOnBindFailure)
{
if (type == null)
@@ -443,7 +431,6 @@ namespace System {
}
// V1 API.
- [System.Security.SecuritySafeCritical]
[MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
public static Delegate CreateDelegate(Type type, MethodInfo method, bool throwOnBindFailure)
{
@@ -494,7 +481,6 @@ namespace System {
}
// V2 API.
- [System.Security.SecuritySafeCritical]
[MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
public static Delegate CreateDelegate(Type type, Object firstArgument, MethodInfo method, bool throwOnBindFailure)
{
@@ -555,7 +541,6 @@ namespace System {
// Implementation of ISerializable
//
- [System.Security.SecurityCritical]
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
{
throw new NotSupportedException();
@@ -566,7 +551,6 @@ namespace System {
// V2 internal API.
// This is Critical because it skips the security check when creating the delegate.
- [System.Security.SecurityCritical] // auto-generated
internal unsafe static Delegate CreateDelegateNoSecurityCheck(Type type, Object target, RuntimeMethodHandle method)
{
// Validate the parameters.
@@ -600,7 +584,6 @@ namespace System {
}
// Caution: this method is intended for deserialization only, no security checks are performed.
- [System.Security.SecurityCritical] // auto-generated
internal static Delegate CreateDelegateNoSecurityCheck(RuntimeType type, Object firstArgument, MethodInfo method)
{
// Validate the parameters.
@@ -642,7 +625,6 @@ namespace System {
return CreateDelegate(type, method, true);
}
- [System.Security.SecuritySafeCritical]
internal static Delegate CreateDelegateInternal(RuntimeType rtType, RuntimeMethodInfo rtMethod, Object firstArgument, DelegateBindingFlags flags, ref StackCrawlMark stackMark)
{
Contract.Assert((flags & DelegateBindingFlags.SkipSecurityChecks) == 0);
@@ -663,7 +645,6 @@ namespace System {
return UnsafeCreateDelegate(rtType, rtMethod, firstArgument, flags);
}
- [System.Security.SecurityCritical]
internal static Delegate UnsafeCreateDelegate(RuntimeType rtType, RuntimeMethodInfo rtMethod, Object firstArgument, DelegateBindingFlags flags)
{
Delegate d = InternalAlloc(rtType);
@@ -678,62 +659,49 @@ namespace System {
// internal implementation details (FCALLS and utilities)
//
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern bool BindToMethodName(Object target, RuntimeType methodType, String method, DelegateBindingFlags flags);
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern bool BindToMethodInfo(Object target, IRuntimeMethodInfo method, RuntimeType methodType, DelegateBindingFlags flags);
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern static MulticastDelegate InternalAlloc(RuntimeType type);
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern static MulticastDelegate InternalAllocLike(Delegate d);
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern static bool InternalEqualTypes(object a, object b);
// Used by the ctor. Do not call directly.
// The name of this function will appear in managed stacktraces as delegate constructor.
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern void DelegateConstruct(Object target, IntPtr slot);
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern IntPtr GetMulticastInvoke();
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern IntPtr GetInvokeMethod();
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern IRuntimeMethodInfo FindMethodHandle();
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern static bool InternalEqualMethodHandles(Delegate left, Delegate right);
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern IntPtr AdjustTarget(Object target, IntPtr methodPtr);
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern IntPtr GetCallStub(IntPtr methodPtr);
- [System.Security.SecuritySafeCritical]
internal virtual Object GetTarget()
{
return (_methodPtrAux.IsNull()) ? _target : null;
}
- [System.Security.SecurityCritical] // auto-generated
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern static bool CompareUnmanagedFunctionPtrs (Delegate d1, Delegate d2);
}