Lussatite.FeatureManagement.SessionManagers.Framework
0.2.0
See the version list below for details.
dotnet add package Lussatite.FeatureManagement.SessionManagers.Framework --version 0.2.0
NuGet\Install-Package Lussatite.FeatureManagement.SessionManagers.Framework -Version 0.2.0
<PackageReference Include="Lussatite.FeatureManagement.SessionManagers.Framework" Version="0.2.0" />
paket add Lussatite.FeatureManagement.SessionManagers.Framework --version 0.2.0
#r "nuget: Lussatite.FeatureManagement.SessionManagers.Framework, 0.2.0"
// Install Lussatite.FeatureManagement.SessionManagers.Framework as a Cake Addin #addin nuget:?package=Lussatite.FeatureManagement.SessionManagers.Framework&version=0.2.0 // Install Lussatite.FeatureManagement.SessionManagers.Framework as a Cake Tool #tool nuget:?package=Lussatite.FeatureManagement.SessionManagers.Framework&version=0.2.0
Lussatite.FeatureManagement
A light implementation of Microsoft.FeatureManagement interfaces.
- Compatibility with IFeatureManager and IFeatureManagerSnapshot. You should be able to upgrade to the full Microsoft.FeatureManagement NuGet package later.
- A basic implementation that is simpler to wire up then the full Microsoft.FeatureManagement package. This can be useful in situations where there's no support for the AddFeatureManagement() method in your application.
- A few read-only
ISessionManager
implementations. Note that this is not quite what Microsoft had in mind forISessionManager
, but it serves as a good extension point for injecting values into the IFeatureManager result.
Quickstart
Take a dependency on
Lussatite.FeatureManagement
andLussatite.FeatureManagement.LazyCache
.Define a set of string constants for the names of your features. Look at the various static TestFeatures.cs files for ideas.
Create a value provider by implementing ISessionManager or use one or more of the
Lussatite.FeatureManagement.SessionManagers.*
packages. Note that Lussaite.FeatureManagement does not write back to the session manager (unlike the Microsoft.FeatureManagement implementation).Wire-up the following in your IoC/DI container:
- Session manager classes will need to be injected into the feature manager manually, since order does matter.
LussatiteLazyCacheFeatureManager
asIFeatureManagerSnapshot
(usually per-request / scoped lifetime).
Inject
IFeatureManagerSnapshot
into your controller or service classes.await _feature.IsEnabledAsync(string feature)
to obtain the status of the feature flag.
Packages
Lussatite.FeatureManagement:
Target: .NET Standard 2.0
LussatiteFeatureManager
: A basic implementation ofIFeatureManager
.- This does not implement the
Task<bool> IsEnabledAsync<TContext>(string feature, TContext context)
method. - This does not make any calls back to the ISessionManager
Task SetAsync(string featureName, bool enabled)
method.
Lussatite.FeatureManagement.LazyCache:
Target: .NET Standard 2.0
LussatiteLazyCacheFeatureManager
: A cachingIFeatureManagerSnapshot
implementation that usesLazyCache
.- This does not implement the
Task<bool> IsEnabledAsync<TContext>(string feature, TContext context)
method. - This does not make any calls back to the ISessionManager
Task SetAsync(string featureName, bool enabled)
method.
Lussatite.FeatureManagement.SessionManagers.Core:
Target: .NET Core 3.1 (also compatible with .NET 5+)
ConfigurationValueSessionManager
: A read-only ISessionManager implementation that usesIConfiguration
to obtain its values.SqlSessionManager
: A read-only ISessionManager implementation that uses the user-providedDbCommand
to obtain its values.
Lussatite.FeatureManagement.SessionManagers.Framework:
Target: .NET Framework 4.8
ConfigurationValueSessionManager
: A read-only ISessionManager implementation that uses the static classConfigurationManager
to obtain its values.SqlSessionManager
: A read-only ISessionManager implementation that uses the user-providedDbCommand
to obtain its values.
Build Status
References
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- Lussatite.FeatureManagement (>= 0.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.6.3 | 461 | 6/29/2022 |
1.6.2 | 401 | 6/28/2022 |
1.6.1 | 404 | 6/28/2022 |
1.6.0 | 399 | 6/15/2022 |
1.5.0 | 394 | 6/9/2022 |
1.4.1 | 401 | 5/24/2022 |
1.4.0 | 427 | 5/24/2022 |
1.3.1 | 408 | 5/23/2022 |
1.3.0 | 415 | 5/22/2022 |
1.2.0 | 402 | 5/20/2022 |
1.1.0 | 412 | 5/19/2022 |
1.0.0 | 433 | 5/16/2022 |
0.2.1 | 415 | 5/15/2022 |
0.2.0 | 4,286 | 5/14/2022 |
0.1.1 | 417 | 5/12/2022 |
0.1.0 | 424 | 5/11/2022 |