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

            holder.RemoveCallback(action1);

            return(action0);
        }
Exemplo n.º 2
0
 public ActionBase()
 {
     this.idx = CallbackTable.Register(null);
 }
Exemplo n.º 3
0
        public int Count()
        {
            var holder = CallbackTable.GetHolder(this.idx) as CallbackTable.CallbackHolder;

            return(holder.Count());
        }
Exemplo n.º 4
0
        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));
        }
Exemplo n.º 5
0
        public static int Register(System.Action callback)
        {
            var holder = new CallbackTable.CallbackHolder(callback);

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

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

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

            holder.Invoke();
        }
Exemplo n.º 9
0
 public Action(System.Action action)
 {
     this.idx = CallbackTable.Register(action);
 }