gewuyou ff553977e3 chore(license): 补齐 Apache-2.0 文件头治理
- 新增许可证文件头检查与修复脚本

- 补充维护者手动修复 PR 工作流和 CI 校验

- 更新贡献指南中的文件头说明

- 补齐仓库维护源码和配置文件的许可证声明
2026-05-03 19:39:49 +08:00

29 lines
1.0 KiB
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.

// Copyright (c) 2025-2026 GeWuYou
// SPDX-License-Identifier: Apache-2.0
using GFramework.Game.Abstractions.Routing;
namespace GFramework.Game.Abstractions.UI;
/// <summary>
/// UI路由守卫接口
/// 用于拦截和处理UI路由切换实现业务逻辑解耦
/// </summary>
public interface IUiRouteGuard : IRouteGuard<IUiPageBehavior>
{
/// <summary>
/// 进入UI前的检查
/// </summary>
/// <param name="uiKey">目标UI标识符</param>
/// <param name="param">进入参数</param>
/// <returns>true表示允许进入false表示拦截</returns>
ValueTask<bool> CanEnterAsync(string uiKey, IUiPageEnterParam? param);
/// <summary>
/// 离开UI前的检查。
/// 该成员显式细化了通用路由守卫的离开检查,使 UI 守卫在 API 文档中保持 UI 语义。
/// </summary>
/// <param name="uiKey">当前UI标识符</param>
/// <returns>true表示允许离开false表示拦截</returns>
new ValueTask<bool> CanLeaveAsync(string uiKey);
}