Skip to content

Conversation

@jeff-at-trimble
Copy link

Closes #1029

Allow service interfaces with the same short name in different namespaces to coexist on the same server by specifying a custom gRPC service name.

  • Add ServiceNameAttribute to MagicOnion.Abstractions for overriding the default interface-name-based gRPC routing path
  • Add ServiceNameHelper to resolve the service name from the attribute at runtime (dynamic client and server)
  • Update MethodCollector to resolve the service name from the attribute at source-generation time (static client)
  • Add ServiceName property to IMagicOnionServiceInfo interface
  • Validate against null/whitespace in ServiceNameAttribute constructor
  • Add unit, server, and integration tests for both unary and hub scenarios

Closes Cysharp#1029

Allow service interfaces with the same short name in different namespaces
to coexist on the same server by specifying a custom gRPC service name.

- Add ServiceNameAttribute to MagicOnion.Abstractions for overriding
  the default interface-name-based gRPC routing path
- Add ServiceNameHelper to resolve the service name from the attribute
  at runtime (dynamic client and server)
- Update MethodCollector to resolve the service name from the attribute
  at source-generation time (static client)
- Add ServiceName property to IMagicOnionServiceInfo interface
- Validate against null/whitespace in ServiceNameAttribute constructor
- Add unit, server, and integration tests for both unary and hub scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure/Override Service Naming

1 participant