57 packages tagged with “scope”
Extension for Ninject which allows bindings to define additional scope types.
The Execution Context Scoping package adds the 'Execution Context Scope' lifestyle, which allows instances to live within an explicitly defined execution context scope (or logical call context) and get disposed when this scope ends. This scope allows flowing through asynchronous method calls.
Catel.Core library.
The Lifetime Scoping package adds an advanced new lifestyle called 'Lifetime Scope', which allows instances to live within an explicitly defined thread-specific scope and get disposed when this scope ends.
Creates a Windsor dependency scope per OWIN WebAPI request allowing to use a per request lifestyle component registration in a self-host environment.
Provides the basis for implementing the Ambient Context pattern. Includes a Clock implementation based on it. The Ambient Context pattern is an Inversion of Control (IoC) pattern that provides static access to a dependency while controlling the dependency from the outside. The pattern optimizes code reachability at the cost of reduced transparency, making it suitable for obvious, ubiquitous, rarely-changing dependencies. For example, an entity's constructor can access Clock.UtcNow, avoiding the need to inject the creation datetime or a dependency, at the cost of hiding the fact that a unit test could control the timestamp from the outside. An example from .NET is System.Transactions.TransactionScope. Any code (such as the database connector) can access the static Transaction.Current, yet outer code in the current execution flow controls it, through TransactionScopes. https://github.com/TheArchitectDev/Architect.AmbientContexts Release notes: 2.0.1: - Updated dependencies to the latest versions and removed some unused dependencies. 2.0.0: - BREAKING: ClockScope no longer has a configurable default scope. (See also next item). - BREAKING: Removed explicit support for "configured default scopes", i.e. scopes configured on startup. They posed too many concurrency risks, such as in test runs. (Default scopes without any configuration are still supported.) - BREAKING: Removed the RemoveAmbientScope() method. Deactivate() should be used instead. - Added support for netstandard2.0. - ClockScope's constructor now prefers UTC datetimes, to avoid lossy conversions (due to DST). - ClockScope now exposes a convenience constructor that takes a DateTime instead of a Func<DateTime>. 1.1.1: - Manually disposing scopes from a deeper async level (such as a DisposeAsync() method with the async keyword) now properly affects methods up the call stack and no longer breaks scope nesting. - Improved the protections against race conditions. - Parent properties are no longer unset on disposal (although implementations should not rely on this detail). - Performance improvement: A scope now avoids even instantiating its AsyncLocal as long as only its default scope is used, as is common in production for certain scopes. - Performance improvement: The JIT can now inline more code, since exceptions have been moved into helper methods. 1.1.0: - Introduced non-generic AmbientScope base class. - Performance improvement: A scope now avoids touching its AsyncLocal as long as only its default scope is used, as is common in production for certain scopes.
Scope-based Authorization for Web API v2.
Convenience methods for adding scoped data to logs.
TwinCAT HMI is a development environment for web-based HMIs (Human Machine Interfaces). This package provides a control for analysis and charting of TwinCAT Scope data in TwinCAT HMI applications.
Library for using scopes with Microsoft.Extensions.Logging.
Encapsulates Microsoft's logger scopes mechanism, giving more freedom in scopes' lifetime management
Capture logging scopes at the time the exception is thrown.
Non official SimpleInjector extensions for Microsoft Azure Webjob
Automatically inititalizes SharpLogContext on every HTTP request
A scoped DataContext implementation for Highway.Data and Entity Framework
LinksPlatform's Platform.Scopes Class Library
A simple and flexible way to manage your NHibernate ISession instances.
Set of extensions to run multiple MediatR commands sequentially. In a transaction scope, just one by one or when you need to fire a notification just after a command succeded/failed.
Scope timer with inner scopes
General-purpose utility libraries and facilities for C#/.Net software development. A catch-all home for things until/unless they find a better home elsewhere.
TransactionScope filter wrapper for Hangfire jobs
指定離開 Scope 執行某些動作
QueryScope was inpired by the gem has_scope for Rails. QueryScope will filter any IQueryable<T> based on the current request variables and any custom named scopes applied.
NLog logging scope tool
Scope functions Map, Apply, ApplyForEach and ApplyForEachEager. They apply passed functions to a given object and return that same object or it's equivalent (or function return for Map), allowing you to have seamless side-effects and manipulate objects in fluent invocation chains or object iniatlizers, i.e. GetConfig().Apply(changes).Build()
Misc. extensions to Microsoft.Extensions.Hosting, such as ScopedHostedService. ScopedHostedService is an IHostedService implementation designed to support regular scoped execution of work using a Timer. The main benefit is a better garbage collection in some applications compared to e.g. BackgroundService (designed for long running tasks and may enjoy less favorable garbage collection than scoped work, in some cases). If your app requires many iterations of smaller jobs, try using this ScopedHostedService to avoid the excessive memory consumption seen in some other implementations of IHostedService.
Simple authorization middleware for granular scope based authorization
JTS SCOPE DotNet Framework BLL Library
Per reqest scope for MiniAutFac
Manage your DbContexts the right way. The persistence or infrastructure layer uses the DbContext (e.g. from a repository). Controlling its scope and transaction lifetime, however, is ideally the reponsibility of the orchestrating layer (e.g. from an application service). This package adds that ability to Entity Framework Core 5.0.0 and up. https://github.com/TheArchitectDev/Architect.EntityFramework.DbContextManagement Release notes: 2.0.1: - Enhancement: Upgraded package versions. 2.0.0: - BREAKING: Now using AmbientContexts 2.0.0. - Semi-breaking: Failure on commit (extremely rare) now throws IOException instead of Exception. - Added static DbContextScope<TDbContext>.HasDbContext, to match the feature set of IDbContextAccessor. - Retries now ensure that the connection is closed before retrying, to avoid the risk of leaking session state. (As with EF's DbContext disposal in general, this relies on the database provider's connection reset.) - Scoped execution now protects against dangerous "failure on commit" retries even on manual commits (rather than just on IExecutionScope's implicit commit). - Worked around an EF bug where the DbContext would obscure the exception caused by a broken model behind an ObjectDisposedException, even though DbContext._disposed=false. - Scoped execution: Fixed a bug where the exception caused by a broken model would be obscured behind a wrongful IncompatibleVersionException. - MockDbContextProvider: Fixed a bug where nested scopes would not work as expected. - MockDbContextProvider: Fixed a bug where soft attempts to roll back a transaction when there was none could cause an unintended TransactionAbortedException. 1.0.1: - Now using AmbientContexts 1.1.1, which fixes extremely rare bugs and improves performance.