コード例 #1
0
 /// <summary>
 ///     Method used for invoking subscription method on Caller thread.
 /// </summary>
 /// <param name="subscriptions">method subscription</param>
 /// <param name="obj">argument</param>
 private void ExecuteOnCallingTrherad(IMessangerSubscription subscriptions, object obj)
 {
     subscriptions.Execute(obj);
 }
コード例 #2
0
 /// <summary>
 ///     Method used for invoking subsciption method on new task (thread)
 /// </summary>
 /// <param name="subscriptions">method subscription</param>
 /// <param name="obj">argument</param>
 private void ExecuteOnNewThread(IMessangerSubscription subscriptions, object obj)
 {
     Task.Factory.StartNew(() => subscriptions.Execute(obj));
 }
コード例 #3
0
 /// <summary>
 ///     Method used for invoking subsciption method on UI Dispatcher thread
 /// </summary>
 /// <param name="subscriptions">method subscription</param>
 /// <param name="obj">argument</param>
 private void ExecuteOnDispatcher(IMessangerSubscription subscriptions, object obj)
 {
     Dispatcher.CurrentDispatcher.Invoke(() => subscriptions.Execute(obj));
 }