Example #1
0
        public void 局部事件()
        {
            IEventBroadcaster eventBroadcaster = Substitute.For <IEventBroadcaster>();

            eventBroadcaster.Register <AMsg>(AMsgCB);
            eventBroadcaster.TriggerEvent(new AMsg());
            Assert.IsTrue(IsCall);
        }
Example #2
0
 public static void TriggerEvent <T>(this IEventBroadcaster broadcaster, T value)
 {
     broadcaster.TriggerEvent(string.Empty, value);
 }