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

Update DPG ResponseClassifiers #2023

Merged
merged 12 commits into from
Mar 8, 2022

Conversation

ShivangiReja
Copy link
Member

Fixes: #2006

Comment on lines +196 to 200
private sealed class ResponseClassifier200To300400To500Override : ResponseClassifier
{
private static ResponseClassifier _instance;
public static ResponseClassifier Instance => _instance ??= new ResponseClassifier200To300400To500();
public override bool IsErrorResponse(HttpMessage message)
{
return message.Response.Status switch
Copy link
Member Author

@ShivangiReja ShivangiReja Mar 2, 2022

Choose a reason for hiding this comment

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

Here is the generated code for ResponseClassifier200To300400To500 based on #2006 (comment)

Comment on lines 152 to 153
private static ResponseClassifier _responseClassifier200;
private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new CoreResponseClassifier(stackalloc int[] { 200 });
Copy link
Member Author

@ShivangiReja ShivangiReja Mar 2, 2022

Choose a reason for hiding this comment

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

Here is the generated code for ResponseClassifier200 based on #2006 (comment)

@ShivangiReja ShivangiReja changed the title Derive DPG ResponseClassifiers from CoreResponseClassifier Update DPG ResponseClassifiers Mar 2, 2022
@ShivangiReja ShivangiReja requested a review from annelo-msft March 2, 2022 03:29
@ShivangiReja
Copy link
Member Author

Reason for this PR failure - #2025 (comment)

@annelo-msft
Copy link
Member

Once Azure/azure-sdk-for-net#27379 merges, we will need to change the CoreResponseClassifier name to StatusCodeClassifier. Probably better to hold this until that happens.

@ShivangiReja ShivangiReja merged commit fea3b3d into Azure:feature/v3 Mar 8, 2022
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.

Derive DPG ResponseClassifiers from CoreResponseClassifier
3 participants