Skip to content

Commit

Permalink
another sample
Browse files Browse the repository at this point in the history
  • Loading branch information
felickz committed Oct 1, 2024
1 parent aea6db6 commit ea88699
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions LogForgingMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ public enum AccountRegistrationEventType
AccountCompleted = 2,
}

public enum RecommendationType
{
AccountType1,
InvestmentType2
}




public LogForgingMiddleware(RequestDelegate next, ILogger<LogForgingMiddleware> logger)
{
Expand Down Expand Up @@ -59,6 +67,11 @@ public async Task InvokeAsync(HttpContext context)

_logger.LogInformation($"InvokeAsync called for event: {AccountRegistrationEventType.AccountCreated}");


RecommendationType type = (RecommendationType)Enum.Parse(typeof(RecommendationType),context.Request.Query["recommendationType"]);
_logger.LogInformation("Success {engineType} recommendation for {assessmentId}.", type, 3);


await _next(context);
}
}

0 comments on commit ea88699

Please sign in to comment.