public static Action operator -(Action action0, System.Action action1)
        {
            var holder = CallbackTable.GetHolder(action0.idx) as CallbackTable.CallbackHolder;

            holder.RemoveCallback(action1);

            return(action0);
        }
 public ActionBase()
 {
     this.idx = CallbackTable.Register(null);
 }
        public int Count()
        {
            var holder = CallbackTable.GetHolder(this.idx) as CallbackTable.CallbackHolder;

            return(holder.Count());
        }
        public static int Register <T0, T1, T2, T3>(System.Action <T0, T1, T2, T3> callback)
        {
            var holder = new CallbackTable.CallbackHolder <T0, T1, T2, T3>(callback);

            return(CallbackTable.InsertHolder(holder));
        }
        public static int Register(System.Action callback)
        {
            var holder = new CallbackTable.CallbackHolder(callback);

            return(CallbackTable.InsertHolder(holder));
        }
        public void RemoveAllListeners()
        {
            var holder = CallbackTable.GetHolder(this.idx) as CallbackTable.CallbackHolder;

            holder.RemoveAll();
        }
        public void RemoveListener(System.Action action)
        {
            var holder = CallbackTable.GetHolder(this.idx) as CallbackTable.CallbackHolder;

            holder.RemoveCallback(action);
        }
        public void Invoke()
        {
            var holder = CallbackTable.GetHolder(this.idx) as CallbackTable.CallbackHolder;

            holder.Invoke();
        }
 public Action(System.Action action)
 {
     this.idx = CallbackTable.Register(action);
 }