Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Correlation Id Provider with Task #95

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

VKAlwaysWin
Copy link

No description provided.

@@ -12,6 +13,6 @@ public interface ICorrelationIdProvider
/// </summary>
/// <param name="context">The <see cref="HttpContext"/> of the current request.</param>
/// <returns>A string representing the correlation ID.</returns>
string GenerateCorrelationId(HttpContext context);
Task<string> GenerateCorrelationId(HttpContext context);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the method is now async, it should probably be named GenerateCorrelationIdAsync

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are your thoughts on accepting a CancellationToken as well?

{
return null;
}
public Task<string> GenerateCorrelationId(HttpContext _) => null;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this implementation be Task.FromResult<string>(null); instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants