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

Provide option for ICorrelationIdProvider to return Task<string> #94

Open
VKAlwaysWin opened this issue Nov 7, 2020 · 0 comments
Open

Comments

@VKAlwaysWin
Copy link

VKAlwaysWin commented Nov 7, 2020

Depends on provided HttpContext.Request.Body I may choose different strategies for CorrelationId value.
To achieve that I am providing custom ICorrelationIdProvider, which is working great.

At the same time it is not possible to read body with Body.ReadToEndAsync, because GenerateCorrelationId return pure string, not Task
To achieve what I want I may use sync operation like ReadToEnd or do ReadToEndAsync.GetAwaiter().GetResult()

Both are not the best options.

Possible solution is to change:
To be this call awaitable
Change default strategies to return Task.FromResult()

Could you please share your thoughts ?

Possible PR #95

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

No branches or pull requests

1 participant