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

docs: dispose registry which contains rate limiters #2438

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

Conversation

lonix1
Copy link

@lonix1 lonix1 commented Jan 10, 2025

Pull Request

The issue or feature being addressed

Disposal docs

Details on the issue fix or feature implementation

See #2425

Confirm the following

  • I started this PR by branching from the head of the default branch
  • I have targeted the PR to merge into the default branch
  • I have included unit tests for the issue/feature
  • I have successfully run a local build

I'm not a GitHub expert, so I hope I did it properly!

@peter-csala
Copy link
Contributor

Hey @lonix1 in order to make sure that the sample codes are compling we place them into *.cs files.
Then we use the mdsnippets tool to render them inside the markdown files.

Please read this documentation: https://github.com/App-vNext/Polly/tree/main/src/Snippets

And here you can see a sample PR which updates some code examples inside the Polly docs: https://github.com/App-vNext/Polly/pull/2355/files

@peter-csala
Copy link
Contributor

Or as an alternative you can place the entire sample code inside the samples folder and refer that inside the docs.

@lonix1
Copy link
Author

lonix1 commented Jan 10, 2025

Sorry, I wasn't sure how to do the PR. I'm not a GitHub expert (I'm using the web interface), but I'll see what I can do.

return pipeline;

// else create pipeline with multiple strategies
var wasCreated = _resiliencePipelineRegistry.TryAddBuilder(partitionKey, (builder, context) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest to take a look at GetOrAddPipeline here. It would make the code simpler.

@peter-csala
Copy link
Contributor

Sorry, I wasn't sure how to do the PR. I'm not a GitHub expert (I'm using the web interface), but I'll see what I can do.

On your fork you can create a code space to use a Visual Studio Code like web-based environment for development.

codespaces

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.

3 participants