Lussatite.FeatureManagement.SessionManagers 1.6.3

.NET Standard 2.0
dotnet add package Lussatite.FeatureManagement.SessionManagers --version 1.6.3
NuGet\Install-Package Lussatite.FeatureManagement.SessionManagers -Version 1.6.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lussatite.FeatureManagement.SessionManagers" Version="1.6.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Lussatite.FeatureManagement.SessionManagers --version 1.6.3
#r "nuget: Lussatite.FeatureManagement.SessionManagers, 1.6.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Lussatite.FeatureManagement.SessionManagers as a Cake Addin
#addin nuget:?package=Lussatite.FeatureManagement.SessionManagers&version=1.6.3

// Install Lussatite.FeatureManagement.SessionManagers as a Cake Tool
#tool nuget:?package=Lussatite.FeatureManagement.SessionManagers&version=1.6.3

Lussatite.FeatureManagement.SessionManagers

Various read-only ISessionManager implementations which are compatible with .NET Standard 2.0. These implementations do not write back to the underlying value store.

ISessionManager Implementations

While these ISessionManager implementations are written for Lussatite.FeatureManagement, they are compatible with the Microsoft ISessionManager interface and could be used with the Microsoft FeatureManager implementation.

ClaimsPrincipalSessionManager

A read-only ISessionManager implementation that examines ClaimsPrincipal claims of type "feature_flag" to obtain the feature value. The value of the claim is either the feature name to indicate true, or the feature name prefixed with an exclamation point ("!") to indicate false.

SqlSessionManager

An ISessionManager implementation that uses user-provided DbCommand objects to obtain/update its values. Write-back is optional for the SetValue() call.

In order to construct the SqlSessionManager, you need to provide it with a SqlSessionManagerSettings object. See the SessionManagers.SqlClient or SessionManagers.SQLite for default setting objects which already have the necessary SQL statements.

var settings = new SQLServerSessionManagerSettings
{
    ConnectionString = "some connection string",
    EnableSetValueCommand = true,
};
var sqlSessionManager = new SqlSessionManager(settings);
// inject the sqlSessionManager into the LussatiteLazyCacheFeatureManager constructor

CachedSqlSessionManager

A cached ISessionManager implementation that uses a user-provided DbCommand to obtain its values. The results for a particular feature flag name will be cached for 60 seconds. This object is configured using a CachedSqlSessionManagerSettings object.

It uses LazyCache under the hood.

StaticAnswerSessionManager

An ISessionManager implementation which always returns the same answer for the feature name. It's really only useful in testing scenarios where you need to validate both control pathways in the code.

Target

  • .NET Standard 2.0

References

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Lussatite.FeatureManagement.SessionManagers:

Package Downloads
RimDev.AspNetCore.FeatureFlags

A library for strongly typed feature flags in .NET Standard 2.0.

Lussatite.FeatureManagement.SessionManagers.SqlClient

A set of SqlSessionManagerSettings implementations for .NET Standard 2.0 which interface with Microsoft SQL Server.

Lussatite.FeatureManagement.SessionManagers.SQLite

A set of SqlSessionManagerSettings implementations for .NET Standard 2.0 which interface with SQLite.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.6.3 1,375 6/29/2022
1.6.2 727 6/28/2022
1.6.1 337 6/28/2022
1.6.0 345 6/15/2022
1.5.0 337 6/9/2022
1.4.1 184 5/24/2022
1.4.0 161 5/24/2022
1.3.1 161 5/23/2022
1.3.0 169 5/22/2022
1.2.0 165 5/20/2022