Пример #1
0
 async Task <LinqServiceInfo> IWcfLinqService.GetInfoAsync(string?configuration)
 {
     try
     {
         return(await _linqService.GetInfoAsync(configuration)
                .ConfigureAwait(Common.Configuration.ContinueOnCapturedContext));;
     }
     catch (Exception exception) when(_transferInternalExceptionToClient)
     {
         throw new FaultException(exception.ToString());
     }
 }
Пример #2
0
 async Task <LinqServiceInfo> IGrpcLinqService.GetInfoAsync(GrpcConfiguration configuration, CallContext context)
 {
     try
     {
         return(await _linqService.GetInfoAsync(
                    configuration.Configuration,
                    context.ServerCallContext?.CancellationToken ?? CancellationToken.None)
                .ConfigureAwait(Common.Configuration.ContinueOnCapturedContext));
     }
     catch (Exception exception) when(_transferInternalExceptionToClient)
     {
         throw new RpcException(new Status(StatusCode.Unknown, exception.ToString()));
     }
 }