protected RpcServiceStubBuilder(RpcServiceInfo serviceInfo, RpcServiceOptions <TService>?options) { this.ServiceInfo = serviceInfo ?? throw new ArgumentNullException(nameof(serviceInfo)); this.Options = options; var converterAttributes = serviceInfo.Type.GetCustomAttributes <RpcFaultConverterAttribute>(); var exceptionConverters = RetrieveServerExceptionConverters(converterAttributes); var faultAttributes = serviceInfo.Type.GetCustomAttributes <RpcFaultAttribute>(); var mappings = GetFaultToDetailsMapping(faultAttributes); if (exceptionConverters.Count > 0 || mappings.Count > 0) { this.FaultHandler = new RpcServerFaultHandler(null, exceptionConverters, mappings); } else { this.FaultHandler = RpcServerFaultHandler.Default; } }
public GrpcServiceStubBuilder(RpcServiceInfo serviceInfo, RpcServiceOptions <TService>?options) : base(serviceInfo, options) { }
public GrpcServiceStubBuilder(RpcServiceOptions <TService>?options) : this(RpcBuilderUtil.GetServiceInfoFromType(typeof(TService)), options) { }