示例#1
0
 /// <summary>
 /// Sets the Messenger's default (static) instance to null.
 /// </summary>
 public static void Reset()
 {
     _defaultInstance = null;
 }
示例#2
0
 /// <summary>
 /// Provides a way to override the Messenger.Default instance with
 /// a custom instance, for example for unit testing purposes.
 /// </summary>
 /// <param name="newMessenger">The instance that will be used as Messenger.Default.</param>
 public static void OverrideDefault(Messenger newMessenger)
 {
     _defaultInstance = newMessenger;
 }