public void UnRegister(WindowObject instance, WindowEvent windowEvent)
        {
            var key = UIWSMath.GetKey(instance.GetHashCode(), (int)windowEvent);

            if (this.cache.ContainsKey(key) == true)
            {
                this.cache[key] = null;
            }
        }
        public void UnRegister(WindowObject instance, WindowEvent windowEvent, System.Action callback)
        {
            var key = UIWSMath.GetKey(instance.GetHashCode(), (int)windowEvent);

            if (this.cache.TryGetValue(key, out var actions) == true)
            {
                actions        -= callback;
                this.cache[key] = actions;
            }
        }
        public void Raise(WindowObject instance, WindowEvent windowEvent)
        {
            var key = UIWSMath.GetKey(instance.GetHashCode(), (int)windowEvent);
            {
                if (this.cache.TryGetValue(key, out var actions) == true)
                {
                    actions.Invoke();
                }
            }

            {
                if (this.cacheOnce.TryGetValue(key, out var actions) == true)
                {
                    actions.Invoke();
                    this.cacheOnce.Remove(key);
                }
            }
        }
 public void Clear(WindowObject instance)
 {
     for (int i = 0; i < this.eventsCount; ++i)
     {
         var key = UIWSMath.GetKey(instance.GetHashCode(), i);
         {
             if (this.cache.ContainsKey(key) == true)
             {
                 this.cache[key] = null;
             }
         }
         {
             if (this.cacheOnce.ContainsKey(key) == true)
             {
                 this.cacheOnce[key] = null;
             }
         }
     }
 }