Exemplo n.º 1
0
 public static bool Send <TView, TMessageType>(TMessageType message, int channel, bool openView = false) where TMessageType : IMessageContainer => EventBusManagerInternal.GetInstance().Send <TView, TMessageType>(message, channel, openView);
Exemplo n.º 2
0
 internal static bool IsViewOpen(Type type, int channel) => EventBusManagerInternal.GetInstance().IsViewOpen(type, channel);
Exemplo n.º 3
0
 /// <summary>
 /// Open new instance of a view. The view must setup the viewModel to the DataContext.
 /// </summary>
 /// <typeparam name="TView"></typeparam>
 public static void OpenView <TView>(int channel) => EventBusManagerInternal.GetInstance().OpenView <TView>(channel);
Exemplo n.º 4
0
 /// <summary>
 /// Deregister closing content.
 /// </summary>
 /// <param name="view">Set the view for deregister</param>
 public static void Deregister(Type view) => EventBusManagerInternal.GetInstance().Deregister(view);
Exemplo n.º 5
0
 internal static bool IsViewOpen <TView>(int channel) => EventBusManagerInternal.GetInstance().IsViewOpen(typeof(TView), channel);
Exemplo n.º 6
0
 /// <summary>
 /// Deregister closing content.
 /// Obsolete: Every view need an dispose interface to cleanup events and unused references.
 /// </summary>
 /// <typeparam name="TView">Set the view for deregister</typeparam>
 public static void Deregister <TView>() => EventBusManagerInternal.GetInstance().Deregister <TView>();
Exemplo n.º 7
0
 /// <summary>
 /// Registers an associated view that is located in another channel.
 /// Enables the view to be removed when the associated main view is closed.
 /// </summary>
 /// <typeparam name="TViewParent">Main view</typeparam>
 /// <typeparam name="TViewChild">Child view</typeparam>
 /// <param name="channel">The channel of the child view.</param>
 public static void AddRegisterChildView <TViewParent, TViewChild>(int channel)
 {
     EventBusManagerInternal.GetInstance().AddRegisterChildView <TViewParent, TViewChild>(channel);
 }
Exemplo n.º 8
0
 /// <summary>
 /// create new internal instance host for message event.
 /// </summary>
 /// <typeparam name="TView">Registered the View (UserControl or inherit dependencyObject).</typeparam>
 /// <typeparam name="TMessage">Registered the message object (Must inherit BaseMessage)</typeparam>
 /// <param name="receiverMethod">Set the method to be executed when a message is received.</param>
 public static void Register <TView, TMessage>(Action <IMessageContainer> receiverMethod)
     where TView : DependencyObject
     where TMessage : IMessageContainer => EventBusManagerInternal.GetInstance().Register <TView, TMessage>(receiverMethod);
Exemplo n.º 9
0
 internal static ViewOpen GetViewOpened(int channel) => EventBusManagerInternal.GetInstance().GeViewOpenend(channel);
Exemplo n.º 10
0
 public static int RegisteredCountByView <TView>() where TView : DependencyObject => EventBusManagerInternal.GetInstance().RegisteredCountByView <TView>();