yessir
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user