-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Separate out RequestOptions from RequestContext #25594
Conversation
API changes have been detected in |
@KrzysztofCwalina @tg-msft I feel that confusion created by having two very similar "context" types is way larger than confusion created by having 2 places to set cancellation tokens. I prefer option 3 from Azure/azure-sdk#3391. It doesn't require a new type just to solve a few corner cases. |
API changes have been detected in API changes + public class RequestOptions {
+ public RequestOptions();
+ public ErrorOptions ErrorOptions { get; set; }
+ public void AddPolicy(HttpPipelinePolicy policy, HttpPipelinePosition position);
+ }
- public class RequestContext {
+ public class RequestContext : RequestOptions {
- public ErrorOptions ErrorOptions { get; set; }
- public void AddPolicy(HttpPipelinePolicy policy, HttpPipelinePosition position); |
API changes have been detected in API changes + public class RequestOptions {
+ public RequestOptions();
+ public ErrorOptions ErrorOptions { get; set; }
+ public void AddPolicy(HttpPipelinePolicy policy, HttpPipelinePosition position);
+ }
- public class RequestContext {
+ public class RequestContext : RequestOptions {
- public ErrorOptions ErrorOptions { get; set; }
- public void AddPolicy(HttpPipelinePolicy policy, HttpPipelinePosition position); |
We will introduce RequestOptions in Core.Experimental to work out details around the use of RO in HLC APIs prior to putting it into Core. |
This pull request is protected by Check Enforcer. |
Closing in favor of: #27149 |
This is so RequestOptions can be used by Gen 1 Generated Clients and not have ambiguity in the method signature regarding which CancellationToken takes precedence, whether two CTs are joined, etc.
Fixes Azure/autorest.csharp#1666