Files
ShrinkCommand.Integration.E…/ShrinkCommandEventBusBridgeEvents.cs
cneicy 06157bf15c
Publish UPM package / publish (push) Failing after 1s
chore: initialize standalone UPM package
2026-08-26 02:49:45 +08:00

53 lines
2.3 KiB
C#

#nullable enable
using System.Collections.Generic;
using ShrinkEventBus;
namespace ShrinkCommand.Integration
{
public sealed class ShrinkCommandExecuteRequestEvent : IShrinkCancelableEvent
{
private bool _isCanceled;
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 bool IsCanceled => _isCanceled;
public void SetCanceled(bool value) => _isCanceled = value;
}
public sealed class ShrinkCommandExecutingEvent : IShrinkEvent
{
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 : IShrinkEvent
{
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 : IShrinkEvent
{
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;
}
}