예제 #1
0
 public static void Completion <T>(
     ConfirmationLogger operation,
     ICommandDelivery <T> delivery) =>
 operation.Succeed(
     "{Command} :{IdempotencyToken} due @ {DueTime}",
     delivery.Command,
     delivery.IdempotencyToken,
     delivery.DueTime);
예제 #2
0
        private void LogResponse(HttpContext context, string responseBody, ConfirmationLogger operation)
        {
            var responseHeaders = context.Response.Headers.HeaderSummary();

            var reasonPhrase = context.Features.Get <IHttpResponseFeature>()?.ReasonPhrase ?? "";

            var responseStatusCode = context.Response.StatusCode;

            operation.Succeed(@"
  HTTP/{reasonPhrase} {responseStatusCode}
{responseHeaders}
  {responseBody}",
                              reasonPhrase,
                              responseStatusCode,
                              responseHeaders,
                              responseBody);
        }
 internal static void Complete(
     this ConfirmationLogger logger,
     Budget budget) =>
 logger.Succeed("Completed with {budget}", budget);