Ejemplo n.º 1
0
 public static bool Unregister(string key)
 {
     if (key == null)
     {
         throw new ArgumentNullException(key);
     }
     return(TimerBase <T> .GetInstance()?.UnregisterInternal(key));
 }
Ejemplo n.º 2
0
        public static void Unregister()
        {
            T instance = TimerBase <T> .GetInstance();

            if (instance != null)
            {
                instance.OnRemove();
            }
        }
Ejemplo n.º 3
0
        public static void Register(string key, float timeout, Action <float> onTimer)
        {
            if (key == null)
            {
                throw new ArgumentNullException(key);
            }
            T instance = TimerBase <T> .GetInstance();

            if (instance != null)
            {
                instance.RegisterInternal(key, timeout, timeout, onTimer, null, null, 1);
            }
        }
Ejemplo n.º 4
0
        public static void Register(string key, float delay, float interval, Action <float> onTimer, Action onCanceled, int times)
        {
            if (key == null)
            {
                throw new ArgumentNullException(key);
            }
            T instance = TimerBase <T> .GetInstance();

            if (instance != null)
            {
                instance.RegisterInternal(key, delay, interval, onTimer, null, onCanceled, times);
            }
        }
Ejemplo n.º 5
0
 public static ulong Register(float delay, float interval, Action <float> onTimer) =>
 TimerBase <T> .GetInstance()?.RegisterInternal(null, delay, interval, onTimer, null, null, 1);
Ejemplo n.º 6
0
 public static ulong Register(float timeout, Action <float> onTimer, int times) =>
 TimerBase <T> .GetInstance()?.RegisterInternal(null, timeout, timeout, onTimer, null, null, times);
Ejemplo n.º 7
0
 public static ulong Register(float timeout, Action onTimer, Action onCanceled) =>
 TimerBase <T> .GetInstance()?.RegisterInternal(null, timeout, timeout, null, onTimer, onCanceled, 1);
Ejemplo n.º 8
0
 public static bool Unregister(ulong id) =>
 TimerBase <T> .GetInstance()?.UnregisterInternal((long)id);
Ejemplo n.º 9
0
 public static ulong Register(float delay, float interval, Action onTimer, Action onCanceled, int times) =>
 TimerBase <T> .GetInstance()?.RegisterInternal(null, delay, interval, null, onTimer, onCanceled, times);