feat(cordis): 接入上下文组合与模组事务热替换

This commit is contained in:
2026-08-16 23:20:40 +08:00
commit ad256f109b
676 changed files with 52168 additions and 0 deletions
@@ -0,0 +1,49 @@
#nullable enable
using System.Collections.Generic;
using ShrinkEventBus;
namespace ShrinkCommand.Integration
{
[Cancelable]
public sealed class ShrinkCommandExecuteRequestEvent : EventBase
{
public string ServiceName { get; set; } = ShrinkCommandConstants.DefaultServiceName;
public string RawInput { get; set; } = string.Empty;
public IShrinkCommandSource? Source { get; set; }
public bool IsHandled { get; set; }
public ShrinkCommandExecutionResult? ExecutionResult { get; set; }
}
public sealed class ShrinkCommandExecutingEvent : EventBase
{
public string ServiceName { get; set; } = ShrinkCommandConstants.DefaultServiceName;
public string RawInput { get; set; } = string.Empty;
public string CommandPath { get; set; } = string.Empty;
public string SourceId { get; set; } = string.Empty;
public string SourceDisplayName { get; set; } = string.Empty;
public Dictionary<string, string> Arguments { get; set; } = new();
}
public sealed class ShrinkCommandExecutedEvent : EventBase
{
public string ServiceName { get; set; } = ShrinkCommandConstants.DefaultServiceName;
public string RawInput { get; set; } = string.Empty;
public string CommandPath { get; set; } = string.Empty;
public string SourceId { get; set; } = string.Empty;
public string SourceDisplayName { get; set; } = string.Empty;
public Dictionary<string, string> Arguments { get; set; } = new();
public bool IsSuccess { get; set; }
public string Message { get; set; } = string.Empty;
}
public sealed class ShrinkCommandFailedEvent : EventBase
{
public string ServiceName { get; set; } = ShrinkCommandConstants.DefaultServiceName;
public string RawInput { get; set; } = string.Empty;
public string CommandPath { get; set; } = string.Empty;
public string SourceId { get; set; } = string.Empty;
public string SourceDisplayName { get; set; } = string.Empty;
public Dictionary<string, string> Arguments { get; set; } = new();
public string ErrorMessage { get; set; } = string.Empty;
}
}