Twileloop.ExpressSettingsCore 1.0.0

Prefix Reserved
Additional Details

This package is no more maintained by the Author. Visit https://packages.twileloop.com/ for new packages

dotnet add package Twileloop.ExpressSettingsCore --version 1.0.0                
NuGet\Install-Package Twileloop.ExpressSettingsCore -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="Twileloop.ExpressSettingsCore" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Twileloop.ExpressSettingsCore --version 1.0.0                
#r "nuget: Twileloop.ExpressSettingsCore, 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.
// Install Twileloop.ExpressSettingsCore as a Cake Addin
#addin nuget:?package=Twileloop.ExpressSettingsCore&version=1.0.0

// Install Twileloop.ExpressSettingsCore as a Cake Tool
#tool nuget:?package=Twileloop.ExpressSettingsCore&version=1.0.0                

Express-Settings

Express settings allows you to create very quick persistant settings in your .NET core app

ExpressSettingsCore is the .NET Core implementatio of Express Settings. Express settings allows you quick prototyping of applications that relies on fetching configurations from settings file. Express settings is seamless to integrate and requires mearly 1 line to read or write settings. It creates readable intented JSON based settings and can be called from anywhere your application.

Create Your Settings Object

Create your settings class with the whatever properties you want to persist

NOTE: Make sure you have a constructor on your settings class that initialises to the default settings value. The library will create a defaut instance of settings from the constructor if it can't find an already persisted settings.

public class MySettings 
{
  public bool EnableApp {get; set;}
  public List < string > Blocklists {get; set;}
  public string URL {get; set;}
  public Debugging Debug {get; set;}

  //Initlaise default settings values
  public MySettings() {
    EnableApp = true;
    Blocklists = new List < string > ();
    URL = "https://default.com";
    Debug = new Debugging();
  }
}


public class Debugging 
{
  public bool EnableVerboseLogging {get; set;}
  public bool EnableTestMode {get; set;}

  //Initlaise default settings values
  public Debugging() {
    EnableTestMode = false;
    EnableVerboseLogging = true;
  }
}

Read/Write Settings Anywhere

Once you have your settings model class, Simply call the ExpressSettings to read or write your settings at valid points on your application. No complexities.

//Read settings (this will return a default instance of 'MySettings' if no persisted settings available)
var settings = Settings<MySettings>.Read();
//Your settings
var settings = new MySettings 
{
  EnableApp = true,
  Blocklists = new List <string> {"List A","List B", "List C", "List D"}, 
  URL = url.Text,
  Debug = new Debugging 
  {
    EnableTestMode = false,
    EnableVerboseLogging = true
  }
};

//Write settings
Settings<MySettings>.Write(settings);
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
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 648 9/12/2020 1.0.0 is deprecated because it is no longer maintained.