Exemplo n.º 1
0
 /// <summary>
 /// Provides a deterministic way to create the CounterViewModel property.
 /// </summary>
 public static void CreateCounterViewModel()
 {
     if (_counterViewModel == null)
     {
         _counterViewModel = new CounterViewModel();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Provides a deterministic way to delete the CounterViewModel property.
 /// </summary>
 public static void ClearCounterViewModel()
 {
     _counterViewModel.Cleanup();
     _counterViewModel = null;
 }