Пример #1
0
 public override Task <CreditResponse> CheckCreditRequest(CreditRequest request, ServerCallContext context)
 {
     return(Task.FromResult(new CreditResponse
     {
         IsAccepted = IsCreditElegible(request.CustomerId, request.Credit)
     }));
 }
 public override Task <CreditReply> CheckCreditRequest(CreditRequest request, ServerCallContext context)
 {
     return(Task.FromResult(new CreditReply
     {
         IsAccepted = IsEligibleForCredit(request.CustomerId, request.Credit)
     }));
 }
Пример #3
0
 public override Task <CreditReply> CheckCreditRequest(CreditRequest request, ServerCallContext context)
 {
     Console.WriteLine($"Request for client: {request.CustomerId}, credit: {request.Credit}");
     return(Task.FromResult(new CreditReply {
         IsAccepted = IsEligibleForCredit(request.CustomerId, request.Credit)
     }));
 }