Esempio n. 1
0
        public static MemCounter Get()
        {
            lock (MemCounterSingletonLocker)
            {
                if (SingletonContext == null)
                {
                    Application.Current.Dispatcher.Invoke(new Action(() =>
                    {
                        SingletonContext = new MemCounter();
#if (DEBUG)
                        SingletonContext.Show();
#endif
                    }));
                    return(SingletonContext);
                }
                return(SingletonContext);
            }
        }
Esempio n. 2
0
 public static MemCounter Get()
 {
     lock (MemCounterSingletonLocker)
     {
         if (SingletonContext == null)
         {
             Application.Current.Dispatcher.Invoke(new Action(() =>
                 {
                     SingletonContext = new MemCounter();
     #if(DEBUG)
                     SingletonContext.Show();
     #endif
                 }));
             return SingletonContext;
         }
         return SingletonContext;
     }
 }