Example #1
0
		public static Delegate Combine(Delegate a, Delegate b)
		{
			if (a == null)
                return b;
            else if (b == null)
                return a;
            else if (a.As<JsObject>().member("all"))
                return ((MulticastDelegate)a).Add(b);
            else
                return new MulticastDelegate(a.Target, new[] { a, b });
		}
Example #2
0
		public static Delegate Remove(Delegate source, Delegate value)
		{
			if (source == value || source == null)
                return null;
            else
			{
			    if (source.As<JsObject>().member("all"))
			        return ((MulticastDelegate)source).Remove(value);
			    else
			        return source;
			}
		}
Example #3
0
 public static Delegate Remove(Delegate source, Delegate value)
 {
     if (source == value || source == null)
     {
         return(null);
     }
     else
     {
         if (source.As <JsObject>().member("all"))
         {
             return(((MulticastDelegate)source).Remove(value));
         }
         else
         {
             return(source);
         }
     }
 }
Example #4
0
 public static Delegate Combine(Delegate a, Delegate b)
 {
     if (a == null)
     {
         return(b);
     }
     else if (b == null)
     {
         return(a);
     }
     else if (a.As <JsObject>().member("all"))
     {
         return(((MulticastDelegate)a).Add(b));
     }
     else
     {
         return(new MulticastDelegate(a.Target, new[] { a, b }));
     }
 }