Пример #1
0
 public virtual void Dispose()
 {
     if (this == Instance)
     {
         SingletonDock.Unregister <T>();
     }
 }
Пример #2
0
        protected bool UnregisterInstance()
        {
            if (SingletonDock <T> .Instance == this)
            {
                SingletonDock <T> .Unregister();
            }

            if (instance != this)
            {
                return(false);
            }
            instance = null;
            return(true);
        }