public void 局部事件() { IEventBroadcaster eventBroadcaster = Substitute.For <IEventBroadcaster>(); eventBroadcaster.Register <AMsg>(AMsgCB); eventBroadcaster.TriggerEvent(new AMsg()); Assert.IsTrue(IsCall); }
public static void TriggerEvent <T>(this IEventBroadcaster broadcaster, T value) { broadcaster.TriggerEvent(string.Empty, value); }