protobuf-net / protobuf-net.Grpc

GRPC bindings for protobuf-net and grpc-dotnet
Other
868 stars 114 forks source link

Using `DataContractAttribute.Name` or `ProtoContractAttribute.Name` as DataContract's name #346

Open DosangGu opened 1 week ago

DosangGu commented 1 week ago

To avoid duplicate data contract name when using DataContract classes with same name, but different namespaces, I think it needs some mechanism for renaming data contract's name.

Found some referencable operation in ServiceBinder class that renames operation contract's name by using OperationAttribute.Name and OperationContractAttribute.Name

https://github.com/protobuf-net/protobuf-net.Grpc/blob/062c18430ad561a7ff37d27857a590e2d1e9ebd5/src/protobuf-net.Grpc/Configuration/ServiceBinder.cs#L162-L165

mgravell commented 1 week ago

services and data types have quite a few differences; can you perhaps give a minimal but complete example of the scenario that is causing you a problem, and what you're seeing, so we don't talk past each-other?