示例#1
0
 /// <summary>
 /// Get the action that would be executed when the event <typeparamref name="TEvent"/> would be published
 /// </summary>
 /// <typeparam name="TEvent"></typeparam>
 /// <param name="messageHub"></param>
 /// <param name="subscribedAction"></param>
 public static void GetAction <TEvent>(this IMessageHub messageHub, Action <Action <TEvent> > subscribedAction)
 {
     messageHub
     .When(_ => _.Subscribe(Arg.Any <Action <TEvent> >()))
     .Do(_ => subscribedAction(_.Arg <Action <TEvent> >()));
 }