/// <summary> /// /// </summary> /// <param name="handler"></param> public SubscribeInfo(Action handler) : this(ObserverHandler.Create(handler)) { }
/// <summary> /// /// </summary> /// <param name="bus"></param> /// <param name="topic">消息主题</param> /// <param name="handler">处理器</param> public static void Unsubscribe(this IMessageBus bus, string topic, Action handler) { Guard.NotNull(bus, "bus"); Guard.NotNull(handler, "handler"); bus.Unsubscribe(topic, null, ObserverHandler.Create(handler)); }