Path: redb-route/redb.Route.Controllers/Attributes/GrpcMethodAttribute.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.Controllers/Attributes/GrpcMethodAttribute.cs
----
namespace redb.Route.Controllers.Attributes;
///
/// Maps a controller method to the name gRPC callers dispatch on (dispatch-method). Optional:
/// without it the C# method name is the wire name, which means renaming the method breaks every client.
/// A gRPC facade publishes its contract outside the codebase, so pin the name here and refactor freely.
/// Mirrors , which does the same for SOAP operations.
///
/// [GrpcMethod("ListUsers")]
/// public Task<UserPage> List(int page) => ...;
///
///
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public sealed class GrpcMethodAttribute : Attribute
{
/// The gRPC dispatch name.
public GrpcMethodAttribute(string method) => Method = method;
/// The gRPC dispatch name.
public string Method { get; }
}