dotnet-cqrs/Svrnty.Sample/InternalCommand.cs
2025-11-03 07:44:17 -05:00

22 lines
656 B
C#

using Svrnty.CQRS.Abstractions;
using Svrnty.CQRS.Grpc.Abstractions.Attributes;
namespace Svrnty.Sample;
// This command is marked with [GrpcIgnore] so it won't be exposed via gRPC
[GrpcIgnore]
public record InternalCommand
{
public string Data { get; set; } = string.Empty;
}
public class InternalCommandHandler : ICommandHandler<InternalCommand>
{
public Task HandleAsync(InternalCommand command, CancellationToken cancellationToken = default)
{
// This is an internal command that should not be exposed via gRPC
Console.WriteLine($"Processing internal command: {command.Data}");
return Task.CompletedTask;
}
}