Esempio n. 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 });
		}
Esempio n. 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;
			}
		}
Esempio n. 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);
         }
     }
 }
Esempio n. 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 }));
     }
 }