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

Apply ClientOptions analyzers to client libraries. #6915

Merged
merged 2 commits into from
Jul 16, 2019

Conversation

annelo-msft
Copy link
Member

Applying analyzers for the following .NET guidelines from section 2.2.6:

✅DO call the highest supported service API version by default.
✅DO allow explicitly selecting a supported service API versions when instantiating service client types.

This should be done using a constructor parameter on the client options type.

  • The parameter must be the first parameter to all constructor overloads.
  • The parameter must not be optional, i.e. all constructor overloads must have it.
  • The parameter should be defaulted to the latest supported service version.
  • The parameter type must be an enum nested in the options type.
  • The parameter type must be called ServiceVersion.

@pakrym pakrym requested a review from AlexGhiondea July 15, 2019 21:43
@pakrym pakrym closed this Jul 15, 2019
@pakrym pakrym reopened this Jul 15, 2019
@pakrym
Copy link
Contributor

pakrym commented Jul 16, 2019

Filed #6944 for app config

@pakrym pakrym merged commit 9dea72e into Azure:master Jul 16, 2019
@annelo-msft annelo-msft deleted the annelo/apply-options-analyzers branch July 29, 2019 18:47
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