Supernova.CSI.FeatureManagmentPack 1.0.0

dotnet add package Supernova.CSI.FeatureManagmentPack --version 1.0.0
                    
NuGet\Install-Package Supernova.CSI.FeatureManagmentPack -Version 1.0.0
                    
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="Supernova.CSI.FeatureManagmentPack" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Supernova.CSI.FeatureManagmentPack" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Supernova.CSI.FeatureManagmentPack" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Supernova.CSI.FeatureManagmentPack --version 1.0.0
                    
#r "nuget: Supernova.CSI.FeatureManagmentPack, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Supernova.CSI.FeatureManagmentPack@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Supernova.CSI.FeatureManagmentPack&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Supernova.CSI.FeatureManagmentPack&version=1.0.0
                    
Install as a Cake Tool

CSI.FeatureManagement

CSI.FeatureManagement is a feature management library for .NET applications, allowing you to enable or disable features for specific users or groups dynamically.

Installation

To install the CSI.FeatureManagement package, use the following command in the NuGet Package Manager Console:

Install-Package CSI.FeatureManagement

Or via .NET CLI:

dotnet add package CSI.FeatureManagement

#Usage

  • Step 1: Add the Required Services Before using the feature management functionality, you need to configure the required services in your Program.cs file. This includes adding the FeatureDbContext, IFeatureStorage, and FeatureManager services to the dependency injection (DI) container.
var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddDbContext<FeatureDbContext>(options =>
    options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));

builder.Services.AddScoped<IFeatureStorage, FeatureStorage>();
builder.Services.AddScoped<FeatureManager>();

// Other service registrations...

var app = builder.Build();
  • Step 2: Apply Migrations To ensure your database is set up correctly, you need to apply any pending migrations. You can do this by calling ApplyMigrations() on the FeatureManager during application startup.
  • Add the following code in Program.cs to apply migrations automatically:
using (var scope = app.Services.CreateScope())
{
    var featureManager = scope.ServiceProvider.GetRequiredService<FeatureManager>();
    featureManager.ApplyMigrations();
}
  • Step 3: Using FeatureManager Once everything is set up, you can use the FeatureManager to manage features and users within your application.

Adding a Feature

var feature = new Feature { Name = "NewFeature", IsEnabled = true };

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contributing

We welcome contributions! Please submit a pull request or open an issue to discuss potential improvements or new features.

Contact

For questions or support, please contact CSI Group at CSISupernova@gmail.com.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.0.0 206 8/18/2024