CI / Go Backend (push) Canceled after 0s
初始化 monorepo: Go后端(7微服务) + Unity客户端(9模块) + 启动器 HTML5原型: Three.js 3D体素世界, Perlin噪声地形, 原版材质, 22种方块 Minecraft创造模式背包: 双栏布局, 拖拽移动物品, 方向性元件引脚 AI助搭策划文档 + 客户端/服务端骨架 + Docker Compose + CI
33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
namespace PCL.Core.App.Configuration;
|
|
|
|
/// <summary>
|
|
/// 配置项事件参数。
|
|
/// </summary>
|
|
/// <param name="Item">配置项。</param>
|
|
/// <param name="Event">触发事件。</param>
|
|
/// <param name="Argument">上下文参数。</param>
|
|
/// <param name="OldValue">旧值。</param>
|
|
/// <param name="NewValue">新值。</param>
|
|
public record ConfigEventArgs(
|
|
ConfigItem Item,
|
|
ConfigEvent Event,
|
|
object? Argument,
|
|
object? OldValue,
|
|
object? NewValue
|
|
) {
|
|
/// <summary>
|
|
/// 设置一个新值代替原来的值进行对应操作,只在 <see cref="ConfigObserver.IsPreview"/> 为 <c>true</c> 时有效。
|
|
/// </summary>
|
|
public object? NewValueReplacement { get; set; } = null;
|
|
|
|
/// <summary>
|
|
/// 是否取消事件,只在 <see cref="ConfigObserver.IsPreview"/> 为 <c>true</c> 时有效。
|
|
/// </summary>
|
|
public bool Cancelled { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// 配置当前的值。
|
|
/// </summary>
|
|
public object? Value => NewValueReplacement ?? NewValue;
|
|
}
|