using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
namespace System
{
/// Represents a delegate, which is a data structure that refers to a static method or to a class instance and an instance method of that class.
/// 2
// Token: 0x02000027 RID: 39
[ClassInterface(ClassInterfaceType.AutoDual)]
[ComVisible(true)]
[Serializable]
public abstract class Delegate : ICloneable, ISerializable
{
/// Initializes a delegate that invokes the specified instance method on the specified class instance.
/// The class instance on which the delegate invokes .
/// The name of the instance method that the delegate represents.
///
/// is null.-or- is null.
/// There was an error binding to the target method.
// Token: 0x06000394 RID: 916 RVA: 0x0000DFE8 File Offset: 0x0000C1E8
protected Delegate(object target, string method)
{
if (target == null)
{
throw new ArgumentNullException("target");
}
if (method == null)
{
throw new ArgumentNullException("method");
}
this.m_target = target;
this.data = new DelegateData();
this.data.method_name = method;
}
/// Initializes a delegate that invokes the specified static method from the specified class.
/// The representing the class that defines .
/// The name of the static method that the delegate represents.
///
/// is null.-or- is null.
///
/// is not a RuntimeType. See Runtime Types in Reflection.-or- represents an open generic type.
// Token: 0x06000395 RID: 917 RVA: 0x0000E03C File Offset: 0x0000C23C
protected Delegate(Type target, string method)
{
if (target == null)
{
throw new ArgumentNullException("target");
}
if (method == null)
{
throw new ArgumentNullException("method");
}
this.data = new DelegateData();
this.data.method_name = method;
this.data.target_type = target;
}
/// Gets the method represented by the delegate.
/// A describing the method represented by the delegate.
/// The caller does not have access to the method represented by the delegate (for example, if the method is private).
/// 2
// Token: 0x1700000D RID: 13
// (get) Token: 0x06000396 RID: 918 RVA: 0x0000E094 File Offset: 0x0000C294
public MethodInfo Method
{
get
{
if (this.method_info != null)
{
return this.method_info;
}
if (this.method != IntPtr.Zero)
{
this.method_info = (MethodInfo)MethodBase.GetMethodFromHandleNoGenericCheck(new RuntimeMethodHandle(this.method));
}
return this.method_info;
}
}
/// Gets the class instance on which the current delegate invokes the instance method.
/// The object on which the current delegate invokes the instance method, if the delegate represents an instance method; null if the delegate represents a static method.
/// 2
// Token: 0x1700000E RID: 14
// (get) Token: 0x06000397 RID: 919 RVA: 0x0000E0EC File Offset: 0x0000C2EC
public object Target
{
get
{
return this.m_target;
}
}
// Token: 0x06000398 RID: 920
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern Delegate CreateDelegate_internal(Type type, object target, MethodInfo info, bool throwOnBindFailure);
// Token: 0x06000399 RID: 921
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern void SetMulticastInvoke();
// Token: 0x0600039A RID: 922 RVA: 0x0000E0F4 File Offset: 0x0000C2F4
private static bool arg_type_match(Type delArgType, Type argType)
{
bool flag = delArgType == argType;
if (!flag && !argType.IsValueType && argType.IsAssignableFrom(delArgType))
{
flag = true;
}
return flag;
}
// Token: 0x0600039B RID: 923 RVA: 0x0000E128 File Offset: 0x0000C328
private static bool return_type_match(Type delReturnType, Type returnType)
{
bool flag = returnType == delReturnType;
if (!flag && !returnType.IsValueType && delReturnType.IsAssignableFrom(returnType))
{
flag = true;
}
return flag;
}
/// Creates a delegate of the specified type that represents the specified static or instance method, with the specified first argument and the specified behavior on failure to bind.
/// A delegate of the specified type that represents the specified static or instance method, or null if is false and the delegate cannot be bound to .
/// A representing the type of delegate to create.
/// An that is the first argument of the method the delegate represents. For instance methods, it must be compatible with the instance type.
/// The describing the static or instance method the delegate is to represent.
/// true to throw an exception if cannot be bound; otherwise, false.
///
/// is null.-or- is null.
///
/// does not inherit .-or- is not a RuntimeType. See Runtime Types in Reflection. -or- cannot be bound, and is true.-or- is not a RuntimeMethodInfo. See Runtime Types in Reflection.
/// The Invoke method of is not found.
/// The caller does not have the permissions necessary to access .
/// 1
///
///
///
// Token: 0x0600039C RID: 924 RVA: 0x0000E15C File Offset: 0x0000C35C
public static Delegate CreateDelegate(Type type, object firstArgument, MethodInfo method, bool throwOnBindFailure)
{
if (type == null)
{
throw new ArgumentNullException("type");
}
if (method == null)
{
throw new ArgumentNullException("method");
}
if (!type.IsSubclassOf(typeof(MulticastDelegate)))
{
throw new ArgumentException("type is not a subclass of Multicastdelegate");
}
MethodInfo methodInfo = type.GetMethod("Invoke");
if (!Delegate.return_type_match(methodInfo.ReturnType, method.ReturnType))
{
if (throwOnBindFailure)
{
throw new ArgumentException("method return type is incompatible");
}
return null;
}
else
{
ParameterInfo[] parameters = methodInfo.GetParameters();
ParameterInfo[] parameters2 = method.GetParameters();
bool flag;
if (firstArgument != null)
{
if (!method.IsStatic)
{
flag = parameters2.Length == parameters.Length;
}
else
{
flag = parameters2.Length == parameters.Length + 1;
}
}
else if (!method.IsStatic)
{
flag = parameters2.Length + 1 == parameters.Length;
}
else
{
flag = parameters2.Length == parameters.Length;
if (!flag)
{
flag = parameters2.Length == parameters.Length + 1;
}
}
if (!flag)
{
if (throwOnBindFailure)
{
throw new ArgumentException("method argument length mismatch");
}
return null;
}
else
{
bool flag2;
if (firstArgument != null)
{
if (!method.IsStatic)
{
flag2 = Delegate.arg_type_match(firstArgument.GetType(), method.DeclaringType);
for (int i = 0; i < parameters2.Length; i++)
{
flag2 &= Delegate.arg_type_match(parameters[i].ParameterType, parameters2[i].ParameterType);
}
}
else
{
flag2 = Delegate.arg_type_match(firstArgument.GetType(), parameters2[0].ParameterType);
for (int j = 1; j < parameters2.Length; j++)
{
flag2 &= Delegate.arg_type_match(parameters[j - 1].ParameterType, parameters2[j].ParameterType);
}
}
}
else if (!method.IsStatic)
{
flag2 = Delegate.arg_type_match(parameters[0].ParameterType, method.DeclaringType);
for (int k = 0; k < parameters2.Length; k++)
{
flag2 &= Delegate.arg_type_match(parameters[k + 1].ParameterType, parameters2[k].ParameterType);
}
}
else if (parameters.Length + 1 == parameters2.Length)
{
flag2 = !parameters2[0].ParameterType.IsValueType;
for (int l = 0; l < parameters.Length; l++)
{
flag2 &= Delegate.arg_type_match(parameters[l].ParameterType, parameters2[l + 1].ParameterType);
}
}
else
{
flag2 = true;
for (int m = 0; m < parameters2.Length; m++)
{
flag2 &= Delegate.arg_type_match(parameters[m].ParameterType, parameters2[m].ParameterType);
}
}
if (flag2)
{
Delegate @delegate = Delegate.CreateDelegate_internal(type, firstArgument, method, throwOnBindFailure);
if (@delegate != null)
{
@delegate.original_method_info = method;
}
return @delegate;
}
if (throwOnBindFailure)
{
throw new ArgumentException("method arguments are incompatible");
}
return null;
}
}
}
/// Creates a delegate of the specified type that represents the specified static or instance method, with the specified first argument.
/// A delegate of the specified type that represents the specified static or instance method.
/// The of delegate to create.
/// The object to which the delegate is bound, or null to treat as static (Shared in Visual Basic).
/// The describing the static or instance method the delegate is to represent.
///
/// is null.-or- is null.
///
/// does not inherit .-or- is not a RuntimeType. See Runtime Types in Reflection. -or- cannot be bound.-or- is not a RuntimeMethodInfo. See Runtime Types in Reflection.
/// The Invoke method of is not found.
/// The caller does not have the permissions necessary to access .
/// 1
///
///
///
// Token: 0x0600039D RID: 925 RVA: 0x0000E444 File Offset: 0x0000C644
public static Delegate CreateDelegate(Type type, object firstArgument, MethodInfo method)
{
return Delegate.CreateDelegate(type, firstArgument, method, true);
}
/// Creates a delegate of the specified type to represent the specified static method, with the specified behavior on failure to bind.
/// A delegate of the specified type to represent the specified static method.
/// The of delegate to create.
/// The describing the static or instance method the delegate is to represent.
/// true to throw an exception if cannot be bound; otherwise, false.
///
/// is null.-or- is null.
///
/// does not inherit .-or- is not a RuntimeType. See Runtime Types in Reflection. -or- cannot be bound, and is true.-or- is not a RuntimeMethodInfo. See Runtime Types in Reflection.
/// The Invoke method of is not found.
/// The caller does not have the permissions necessary to access .
/// 1
///
///
///
// Token: 0x0600039E RID: 926 RVA: 0x0000E450 File Offset: 0x0000C650
public static Delegate CreateDelegate(Type type, MethodInfo method, bool throwOnBindFailure)
{
return Delegate.CreateDelegate(type, null, method, throwOnBindFailure);
}
/// Creates a delegate of the specified type to represent the specified static method.
/// A delegate of the specified type to represent the specified static method.
/// The of delegate to create.
/// The describing the static or instance method the delegate is to represent. Only static methods are supported in the .NET Framework version 1.0 and 1.1.
///
/// is null.-or- is null.
///
/// does not inherit .-or- is not a RuntimeType. See Runtime Types in Reflection. -or- is not a static method, and the .NET Framework version is 1.0 or 1.1. -or- cannot be bound.-or- is not a RuntimeMethodInfo. See Runtime Types in Reflection.
/// The Invoke method of is not found.
/// The caller does not have the permissions necessary to access .
/// 1
///
///
///
// Token: 0x0600039F RID: 927 RVA: 0x0000E45C File Offset: 0x0000C65C
public static Delegate CreateDelegate(Type type, MethodInfo method)
{
return Delegate.CreateDelegate(type, method, true);
}
/// Creates a delegate of the specified type that represents the specified instance method to invoke on the specified class instance.
/// A delegate of the specified type that represents the specified instance method to invoke on the specified class instance.
/// The of delegate to create.
/// The class instance on which is invoked.
/// The name of the instance method that the delegate is to represent.
///
/// is null.-or- is null.-or- is null.
///
/// does not inherit . -or- is not a RuntimeType. See Runtime Types in Reflection.-or- is not an instance method. -or- cannot be bound, for example because it cannot be found.
/// The Invoke method of is not found.
/// The caller does not have the permissions necessary to access .
/// 1
///
///
///
// Token: 0x060003A0 RID: 928 RVA: 0x0000E468 File Offset: 0x0000C668
public static Delegate CreateDelegate(Type type, object target, string method)
{
return Delegate.CreateDelegate(type, target, method, false);
}
// Token: 0x060003A1 RID: 929 RVA: 0x0000E474 File Offset: 0x0000C674
private static MethodInfo GetCandidateMethod(Type type, Type target, string method, BindingFlags bflags, bool ignoreCase, bool throwOnBindFailure)
{
if (type == null)
{
throw new ArgumentNullException("type");
}
if (method == null)
{
throw new ArgumentNullException("method");
}
if (!type.IsSubclassOf(typeof(MulticastDelegate)))
{
throw new ArgumentException("type is not subclass of MulticastDelegate.");
}
MethodInfo methodInfo = type.GetMethod("Invoke");
ParameterInfo[] parameters = methodInfo.GetParameters();
Type[] array = new Type[parameters.Length];
for (int i = 0; i < parameters.Length; i++)
{
array[i] = parameters[i].ParameterType;
}
BindingFlags bindingFlags = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.ExactBinding | bflags;
if (ignoreCase)
{
bindingFlags |= BindingFlags.IgnoreCase;
}
MethodInfo methodInfo2 = null;
for (Type type2 = target; type2 != null; type2 = type2.BaseType)
{
MethodInfo methodInfo3 = type2.GetMethod(method, bindingFlags, null, array, new ParameterModifier[0]);
if (methodInfo3 != null && Delegate.return_type_match(methodInfo.ReturnType, methodInfo3.ReturnType))
{
methodInfo2 = methodInfo3;
break;
}
}
if (methodInfo2 != null)
{
return methodInfo2;
}
if (throwOnBindFailure)
{
throw new ArgumentException("Couldn't bind to method '" + method + "'.");
}
return null;
}
/// Creates a delegate of the specified type that represents the specified static method of the specified class, with the specified case-sensitivity and the specified behavior on failure to bind.
/// A delegate of the specified type that represents the specified static method of the specified class.
/// The of delegate to create.
/// The representing the class that implements .
/// The name of the static method that the delegate is to represent.
/// A Boolean indicating whether to ignore the case when comparing the name of the method.
/// true to throw an exception if cannot be bound; otherwise, false.
///
/// is null.-or- is null.-or- is null.
///
/// does not inherit .-or- is not a RuntimeType. See Runtime Types in Reflection. -or- is not a RuntimeType.-or- is an open generic type. That is, its property is true.-or- is not a static method (Shared method in Visual Basic). -or- cannot be bound, for example because it cannot be found, and is true.
/// The Invoke method of is not found.
/// The caller does not have the permissions necessary to access .
/// 1
///
///
///
// Token: 0x060003A2 RID: 930 RVA: 0x0000E594 File Offset: 0x0000C794
public static Delegate CreateDelegate(Type type, Type target, string method, bool ignoreCase, bool throwOnBindFailure)
{
if (target == null)
{
throw new ArgumentNullException("target");
}
MethodInfo candidateMethod = Delegate.GetCandidateMethod(type, target, method, BindingFlags.Static, ignoreCase, throwOnBindFailure);
if (candidateMethod == null)
{
return null;
}
return Delegate.CreateDelegate_internal(type, null, candidateMethod, throwOnBindFailure);
}
/// Creates a delegate of the specified type that represents the specified static method of the specified class.
/// A delegate of the specified type that represents the specified static method of the specified class.
/// The of delegate to create.
/// The representing the class that implements .
/// The name of the static method that the delegate is to represent.
///
/// is null.-or- is null.-or- is null.
///
/// does not inherit .-or- is not a RuntimeType. See Runtime Types in Reflection. -or- is not a RuntimeType.-or- is an open generic type. That is, its property is true.-or- is not a static method (Shared method in Visual Basic). -or- cannot be bound, for example because it cannot be found, and is true.
/// The Invoke method of is not found.
/// The caller does not have the permissions necessary to access .
/// 1
///
///
///
// Token: 0x060003A3 RID: 931 RVA: 0x0000E5D4 File Offset: 0x0000C7D4
public static Delegate CreateDelegate(Type type, Type target, string method)
{
return Delegate.CreateDelegate(type, target, method, false, true);
}
/// Creates a delegate of the specified type that represents the specified static method of the specified class, with the specified case-sensitivity.
/// A delegate of the specified type that represents the specified static method of the specified class.
/// The of delegate to create.
/// The representing the class that implements .
/// The name of the static method that the delegate is to represent.
/// A Boolean indicating whether to ignore the case when comparing the name of the method.
///
/// is null.-or- is null.-or- is null.
///
/// does not inherit .-or- is not a RuntimeType. See Runtime Types in Reflection. -or- is not a RuntimeType.-or- is an open generic type. That is, its property is true.-or- is not a static method (Shared method in Visual Basic). -or- cannot be bound, for example because it cannot be found.
/// The Invoke method of is not found.
/// The caller does not have the permissions necessary to access .
/// 1
///
///
///
// Token: 0x060003A4 RID: 932 RVA: 0x0000E5E0 File Offset: 0x0000C7E0
public static Delegate CreateDelegate(Type type, Type target, string method, bool ignoreCase)
{
return Delegate.CreateDelegate(type, target, method, ignoreCase, true);
}
/// Creates a delegate of the specified type that represents the specified instance method to invoke on the specified class instance, with the specified case-sensitivity and the specified behavior on failure to bind.
/// A delegate of the specified type that represents the specified instance method to invoke on the specified class instance.
/// The of delegate to create.
/// The class instance on which is invoked.
/// The name of the instance method that the delegate is to represent.
/// A Boolean indicating whether to ignore the case when comparing the name of the method.
/// true to throw an exception if cannot be bound; otherwise, false.
///
/// is null.-or- is null.-or- is null.
///
/// does not inherit .-or- is not a RuntimeType. See Runtime Types in Reflection. -or- is not an instance method. -or- cannot be bound, for example because it cannot be found, and is true.
/// The Invoke method of is not found.
/// The caller does not have the permissions necessary to access .
/// 1
///
///
///
// Token: 0x060003A5 RID: 933 RVA: 0x0000E5EC File Offset: 0x0000C7EC
public static Delegate CreateDelegate(Type type, object target, string method, bool ignoreCase, bool throwOnBindFailure)
{
if (target == null)
{
throw new ArgumentNullException("target");
}
MethodInfo candidateMethod = Delegate.GetCandidateMethod(type, target.GetType(), method, BindingFlags.Instance, ignoreCase, throwOnBindFailure);
if (candidateMethod == null)
{
return null;
}
return Delegate.CreateDelegate_internal(type, target, candidateMethod, throwOnBindFailure);
}
/// Creates a delegate of the specified type that represents the specified instance method to invoke on the specified class instance with the specified case-sensitivity.
/// A delegate of the specified type that represents the specified instance method to invoke on the specified class instance.
/// The of delegate to create.
/// The class instance on which is invoked.
/// The name of the instance method that the delegate is to represent.
/// A Boolean indicating whether to ignore the case when comparing the name of the method.
///
/// is null.-or- is null.-or- is null.
///
/// does not inherit .-or- is not a RuntimeType. See Runtime Types in Reflection.-or- is not an instance method. -or- cannot be bound, for example because it cannot be found.
/// The Invoke method of is not found.
/// The caller does not have the permissions necessary to access .
/// 1
///
///
///
// Token: 0x060003A6 RID: 934 RVA: 0x0000E630 File Offset: 0x0000C830
public static Delegate CreateDelegate(Type type, object target, string method, bool ignoreCase)
{
return Delegate.CreateDelegate(type, target, method, ignoreCase, true);
}
/// Dynamically invokes (late-bound) the method represented by the current delegate.
/// The object returned by the method represented by the delegate.
/// An array of objects that are the arguments to pass to the method represented by the current delegate.-or- null, if the method represented by the current delegate does not require arguments.
/// The caller does not have access to the method represented by the delegate (for example, if the method is private).-or- The number, order, or type of parameters listed in is invalid.
/// The method represented by the delegate is an instance method and the target object is null.-or- The method represented by the delegate is invoked on an object or a class that does not support it.
/// One of the encapsulated methods throws an exception.
/// 2
// Token: 0x060003A7 RID: 935 RVA: 0x0000E63C File Offset: 0x0000C83C
public object DynamicInvoke(params object[] args)
{
return this.DynamicInvokeImpl(args);
}
/// Dynamically invokes (late-bound) the method represented by the current delegate.
/// The object returned by the method represented by the delegate.
/// An array of objects that are the arguments to pass to the method represented by the current delegate.-or- null, if the method represented by the current delegate does not require arguments.
/// The caller does not have access to the method represented by the delegate (for example, if the method is private).-or- The number, order, or type of parameters listed in is invalid.
/// The method represented by the delegate is an instance method and the target object is null.-or- The method represented by the delegate is invoked on an object or a class that does not support it.
/// One of the encapsulated methods throws an exception.
// Token: 0x060003A8 RID: 936 RVA: 0x0000E648 File Offset: 0x0000C848
protected virtual object DynamicInvokeImpl(object[] args)
{
if (this.Method == null)
{
Type[] array = new Type[args.Length];
for (int i = 0; i < args.Length; i++)
{
array[i] = args[i].GetType();
}
this.method_info = this.m_target.GetType().GetMethod(this.data.method_name, array);
}
if (this.m_target != null && this.Method.IsStatic)
{
if (args != null)
{
object[] array2 = new object[args.Length + 1];
args.CopyTo(array2, 1);
array2[0] = this.m_target;
args = array2;
}
else
{
args = new object[] { this.m_target };
}
return this.Method.Invoke(null, args);
}
return this.Method.Invoke(this.m_target, args);
}
/// Creates a shallow copy of the delegate.
/// A shallow copy of the delegate.
/// 2
// Token: 0x060003A9 RID: 937 RVA: 0x0000E720 File Offset: 0x0000C920
public virtual object Clone()
{
return base.MemberwiseClone();
}
/// Determines whether the specified object and the current delegate are of the same type and share the same targets, methods, and invocation list.
/// true if and the current delegate have the same targets, methods, and invocation list; otherwise, false.
/// The object to compare with the current delegate.
/// The caller does not have access to the method represented by the delegate (for example, if the method is private).
/// 2
// Token: 0x060003AA RID: 938 RVA: 0x0000E728 File Offset: 0x0000C928
public override bool Equals(object obj)
{
Delegate @delegate = obj as Delegate;
return @delegate != null && (@delegate.m_target == this.m_target && @delegate.method == this.method) && ((@delegate.data == null && this.data == null) || (@delegate.data != null && this.data != null && @delegate.data.target_type == this.data.target_type && @delegate.data.method_name == this.data.method_name));
}
/// Returns a hash code for the delegate.
/// A hash code for the delegate.
/// 2
// Token: 0x060003AB RID: 939 RVA: 0x0000E7D8 File Offset: 0x0000C9D8
public override int GetHashCode()
{
return this.method.GetHashCode() ^ ((this.m_target == null) ? 0 : this.m_target.GetHashCode());
}
/// Gets the static method represented by the current delegate.
/// A describing the static method represented by the current delegate.
/// The caller does not have access to the method represented by the delegate (for example, if the method is private).
// Token: 0x060003AC RID: 940 RVA: 0x0000E810 File Offset: 0x0000CA10
protected virtual MethodInfo GetMethodImpl()
{
return this.Method;
}
/// Not supported.
/// Not supported.
/// Not supported.
/// This method is not supported.
/// 2
// Token: 0x060003AD RID: 941 RVA: 0x0000E818 File Offset: 0x0000CA18
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
{
DelegateSerializationHolder.GetDelegateData(this, info, context);
}
/// Returns the invocation list of the delegate.
/// An array of delegates representing the invocation list of the current delegate.
/// 2
// Token: 0x060003AE RID: 942 RVA: 0x0000E824 File Offset: 0x0000CA24
public virtual Delegate[] GetInvocationList()
{
return new Delegate[] { this };
}
/// Concatenates the invocation lists of two delegates.
/// A new delegate with an invocation list that concatenates the invocation lists of and in that order. Returns if is null, returns if is a null reference, and returns a null reference if both and are null references.
/// The delegate whose invocation list comes first.
/// The delegate whose invocation list comes last.
/// Both and are not null, and and are not instances of the same delegate type.
/// 1
// Token: 0x060003AF RID: 943 RVA: 0x0000E830 File Offset: 0x0000CA30
public static Delegate Combine(Delegate a, Delegate b)
{
if (a == null)
{
if (b == null)
{
return null;
}
return b;
}
else
{
if (b == null)
{
return a;
}
if (a.GetType() != b.GetType())
{
throw new ArgumentException(Locale.GetText("Incompatible Delegate Types."));
}
return a.CombineImpl(b);
}
}
/// Concatenates the invocation lists of an array of delegates.
/// A new delegate with an invocation list that concatenates the invocation lists of the delegates in the array. Returns null if is null, if contains zero elements, or if every entry in is null.
/// The array of delegates to combine.
/// Not all the non-null entries in are instances of the same delegate type.
/// 1
// Token: 0x060003B0 RID: 944 RVA: 0x0000E880 File Offset: 0x0000CA80
[ComVisible(true)]
public static Delegate Combine(params Delegate[] delegates)
{
if (delegates == null)
{
return null;
}
Delegate @delegate = null;
foreach (Delegate delegate2 in delegates)
{
@delegate = Delegate.Combine(@delegate, delegate2);
}
return @delegate;
}
/// Concatenates the invocation lists of the specified multicast (combinable) delegate and the current multicast (combinable) delegate.
/// A new multicast (combinable) delegate with an invocation list that concatenates the invocation list of the current multicast (combinable) delegate and the invocation list of , or the current multicast (combinable) delegate if is null.
/// The multicast (combinable) delegate whose invocation list to append to the end of the invocation list of the current multicast (combinable) delegate.
/// Always thrown.
// Token: 0x060003B1 RID: 945 RVA: 0x0000E8BC File Offset: 0x0000CABC
protected virtual Delegate CombineImpl(Delegate d)
{
throw new MulticastNotSupportedException(string.Empty);
}
/// Removes the last occurrence of the invocation list of a delegate from the invocation list of another delegate.
/// A new delegate with an invocation list formed by taking the invocation list of and removing the last occurrence of the invocation list of , if the invocation list of is found within the invocation list of . Returns if is null or if the invocation list of is not found within the invocation list of . Returns a null reference if the invocation list of is equal to the invocation list of or if is a null reference.
/// The delegate from which to remove the invocation list of .
/// The delegate that supplies the invocation list to remove from the invocation list of .
/// The caller does not have access to the method represented by the delegate (for example, if the method is private).
/// The delegate types do not match.
/// 1
// Token: 0x060003B2 RID: 946 RVA: 0x0000E8C8 File Offset: 0x0000CAC8
public static Delegate Remove(Delegate source, Delegate value)
{
if (source == null)
{
return null;
}
return source.RemoveImpl(value);
}
/// Removes the invocation list of a delegate from the invocation list of another delegate.
/// A new delegate with an invocation list formed by taking the invocation list of the current delegate and removing the invocation list of , if the invocation list of is found within the current delegate's invocation list. Returns the current delegate if is null or if the invocation list of is not found within the current delegate's invocation list. Returns null if the invocation list of is equal to the current delegate's invocation list.
/// The delegate that supplies the invocation list to remove from the invocation list of the current delegate.
/// The caller does not have access to the method represented by the delegate (for example, if the method is private).
// Token: 0x060003B3 RID: 947 RVA: 0x0000E8DC File Offset: 0x0000CADC
protected virtual Delegate RemoveImpl(Delegate d)
{
if (this.Equals(d))
{
return null;
}
return this;
}
/// Removes all occurrences of the invocation list of a delegate from the invocation list of another delegate.
/// A new delegate with an invocation list formed by taking the invocation list of and removing all occurrences of the invocation list of , if the invocation list of is found within the invocation list of . Returns if is null or if the invocation list of is not found within the invocation list of . Returns a null reference if the invocation list of is equal to the invocation list of , if contains only a series of invocation lists that are equal to the invocation list of , or if is a null reference.
/// The delegate from which to remove the invocation list of .
/// The delegate that supplies the invocation list to remove from the invocation list of .
/// The caller does not have access to the method represented by the delegate (for example, if the method is private).
/// The delegate types do not match.
/// 1
// Token: 0x060003B4 RID: 948 RVA: 0x0000E8F0 File Offset: 0x0000CAF0
public static Delegate RemoveAll(Delegate source, Delegate value)
{
Delegate @delegate = source;
while ((source = Delegate.Remove(source, value)) != @delegate)
{
@delegate = source;
}
return @delegate;
}
/// Determines whether the specified delegates are equal.
/// true if is equal to ; otherwise, false.
/// The first delegate to compare.
/// The second delegate to compare.
/// 3
// Token: 0x060003B5 RID: 949 RVA: 0x0000E91C File Offset: 0x0000CB1C
public static bool operator ==(Delegate d1, Delegate d2)
{
if (d1 == null)
{
return d2 == null;
}
return d2 != null && d1.Equals(d2);
}
/// Determines whether the specified delegates are not equal.
/// true if is not equal to ; otherwise, false.
/// The first delegate to compare.
/// The second delegate to compare.
/// 3
// Token: 0x060003B6 RID: 950 RVA: 0x0000E940 File Offset: 0x0000CB40
public static bool operator !=(Delegate d1, Delegate d2)
{
return !(d1 == d2);
}
// Token: 0x0400005C RID: 92
private IntPtr method_ptr;
// Token: 0x0400005D RID: 93
private IntPtr invoke_impl;
// Token: 0x0400005E RID: 94
private object m_target;
// Token: 0x0400005F RID: 95
private IntPtr method;
// Token: 0x04000060 RID: 96
private IntPtr delegate_trampoline;
// Token: 0x04000061 RID: 97
private IntPtr method_code;
// Token: 0x04000062 RID: 98
private MethodInfo method_info;
// Token: 0x04000063 RID: 99
private MethodInfo original_method_info;
// Token: 0x04000064 RID: 100
private DelegateData data;
}
}