diff --git a/DMSkin.Core/Common/Broadcast.cs b/DMSkin.Core/Common/Broadcast.cs index eae1ed4..4474764 100644 --- a/DMSkin.Core/Common/Broadcast.cs +++ b/DMSkin.Core/Common/Broadcast.cs @@ -78,18 +78,6 @@ public static bool RegisterBroadcast(string name, Action> a { return Register(name, action); } - - /// - /// 注册广播接收器-广播返回值 - /// - /// 广播传递的数据类型 - /// 广播返回的数据类型 - /// 广播名称 - /// 广播的回调函数 - public static bool RegisterBroadcast(string name, Func action) - { - return Register(name, action); - } #endregion #region 推送广播 @@ -136,30 +124,6 @@ public static void PushBroadcast(string name, T parameter = default, Acti } } } - - /// - /// 推送广播-并执行回调 - /// - /// 广播传递的数据类型 - /// 广播回调消息的数据类型 - /// 广播名称 - /// 广播传递的数据 - /// 广播订阅者的回传信息 - public static T1 PushBroadcast(string name, T parameter = default) - { - var broadcast = FindBroadcast(name); - if (broadcast != null) - { - foreach (var item in broadcast) - { - if (item is Func action) - { - return action.Invoke(parameter); - } - } - } - return default; - } #endregion #region 卸载广播 diff --git a/Demos/DMSkinDemo/View/PageBroadcast.xaml b/Demos/DMSkinDemo/View/PageBroadcast.xaml index 44c0e53..aaef8f7 100644 --- a/Demos/DMSkinDemo/View/PageBroadcast.xaml +++ b/Demos/DMSkinDemo/View/PageBroadcast.xaml @@ -18,7 +18,7 @@ - +