GFramework/GFramework.Core/extensions/OrEventExtensions.cs
GwWuYou 157b3ce846 refactor(events): 将类型事件系统重构为事件总线
- 将TypeEventSystem重命名为EventBus
- 将IEasyEvent接口重命名为IEvent接口
- 将ITypeEventSystem接口重命名为IEventBus接口
- 更新Architecture类中使用TypeEventSystem为EventBus
- 更新ArchitectureContext中依赖注入参数类型
- 将EasyEvent泛型类重命名为Event泛型类
- 更新所有相关类型引用和实现
- 修改接口继承关系以使用新的事件接口命名
2026-01-11 11:17:30 +08:00

21 lines
747 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using GFramework.Core.Abstractions.events;
using GFramework.Core.events;
namespace GFramework.Core.extensions;
/// <summary>
/// 提供Or事件扩展方法的静态类
/// </summary>
public static class OrEventExtensions
{
/// <summary>
/// 创建一个OrEvent实例将当前事件与指定事件进行逻辑或运算组合
/// </summary>
/// <param name="self">当前的IEasyEvent事件实例</param>
/// <param name="e">要与当前事件进行或运算的另一个IEasyEvent事件实例</param>
/// <returns>返回一个新的OrEvent实例表示两个事件的或运算结果</returns>
public static OrEvent Or(this IEvent self, IEvent e)
{
return new OrEvent().Or(self).Or(e);
}
}