LiteConfig 1.0.3

dotnet add package LiteConfig --version 1.0.3
                    
NuGet\Install-Package LiteConfig -Version 1.0.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="LiteConfig" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LiteConfig" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="LiteConfig" />
                    
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 LiteConfig --version 1.0.3
                    
#r "nuget: LiteConfig, 1.0.3"
                    
#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 LiteConfig@1.0.3
                    
#: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=LiteConfig&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=LiteConfig&version=1.0.3
                    
Install as a Cake Tool

LiteConfig (.lc) Library

LiteConfigLogo

LiteConfig (.lc) is a lightweight configuration file format designed for ease of use primacy.

Features

  • Types: Read values in standard types int, float, double, bool, and string with dedicated methods - Other types will attempt to be dynamically understood
  • Dictionary: Optionally cache your config file using the included Data property for dictionary access
  • Simplicity: LC is designed to be a very barebones format, and as such very few "extras" are included

Installation

Using NuGet:

Install-Package LiteConfig

Example File

# Single line comments
title: Example
shortForm: single-line strings do not require double quotes
longForm: "strings of text with multiple lines,
can be written by enclosing the whole block of text in double quotes."
firstToggle: True
secondToggle: false
whatDayIsIt: 01/01/1970
lines: 11
collection: item1, item2
collectionSize: 2.0

Usage

using LiteConfig;

public class App
{
	public App()
	{
		LC lc = new();
		lc.LoadFromFile("config.lc");
		string name = lc.Data["name"];

		// OR
		name = LC.ReadString("config.lc", "name");

		// OR
		name = LC.ReadValue<string>("config.lc", "name");

		string item1 = LC.ReadList<string>("config.lc", "collection").ToArray()[0];
	}
}

Distribution and Usage Rights

You are granted full freedom and permission to:

  • Distribute this library as you see fit, whether in its original form or in a modified version.
  • Decompile and use any part of the code directly in your projects.
  • Copy code from the repository, and use any part of the code directly in your projects.
  • Bundle it within an executable or any other software structure.
  • Re-purpose and use this library in any other manner you deem necessary.

In essence, you have carte blanche to utilize this library in any manner you choose. Please remember to respect the licensing agreement for any other third-party libraries or resources that LiteConfig may depend on.

Repository:

LiteConfig is maintained in its latest (and occasionally broken) state on GitHub

License

This library is licensed under the GPL License.

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.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

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.3 172 5/14/2024
1.0.2 287 10/21/2023
1.0.1 154 10/21/2023
1.0.0 157 9/12/2023