https://github.com/shuttle/shuttle.core.pipelinetransactionscope
Provides a mechanism to create a transaction scope when a pipeline stage starts.
https://github.com/shuttle/shuttle.core.pipelinetransactionscope
Last synced: about 1 month ago
JSON representation
Provides a mechanism to create a transaction scope when a pipeline stage starts.
- Host: GitHub
- URL: https://github.com/shuttle/shuttle.core.pipelinetransactionscope
- Owner: Shuttle
- License: bsd-3-clause
- Created: 2024-07-27T06:09:49.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-02-02T11:59:10.000Z (4 months ago)
- Last Synced: 2025-03-19T03:06:17.924Z (2 months ago)
- Language: C#
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shuttle.Core.PipelineTransactionScope
Provides a pipeline observer to handle transaction scopes that are started when a given stage starts.
The `PipelineTransactionScopeObserver` will start a transaction scope when a stage is reached that requires a transaction scope. The transaction scope will be completed when the stage has completed.
If there is a requirement to complete the transactions scope before the stage completes then the pipeline can raise the `OnCompleteTransactionScope` event, followed by the `OnDisposeTransactionScope` event. Raising the `OnDisposeTransactionScope` is optional as the transcation scope will still be disposed at the end of the stage if it has not been disposed already.
## Configuration
```c#
services.AddPipelineTransactionScope(builder => {
builder.AddPipeline(typeof(ThePipelineClass), "StageNameThatRequiresTransactionScope");// or use the extension method
builder.AddPipeline("StageNameThatRequiresTransactionScope");
});
```