StoneKit.Configuration.IniParser
1.24.121.182729
See the version list below for details.
dotnet add package StoneKit.Configuration.IniParser --version 1.24.121.182729
NuGet\Install-Package StoneKit.Configuration.IniParser -Version 1.24.121.182729
<PackageReference Include="StoneKit.Configuration.IniParser" Version="1.24.121.182729" />
paket add StoneKit.Configuration.IniParser --version 1.24.121.182729
#r "nuget: StoneKit.Configuration.IniParser, 1.24.121.182729"
// Install StoneKit.Configuration.IniParser as a Cake Addin
#addin nuget:?package=StoneKit.Configuration.IniParser&version=1.24.121.182729
// Install StoneKit.Configuration.IniParser as a Cake Tool
#tool nuget:?package=StoneKit.Configuration.IniParser&version=1.24.121.182729
StoneKit.Configuration.IniParser
A simple and efficient INI file parser for .NET 8+
Overview
StoneKit.Configuration.IniParser
is a lightweight library for parsing INI files in .NET 8+ applications.
It allows you to read and manipulate configuration settings stored in INI files with ease.
Installation
Install the library via NuGet Package Manager Console:
Install-Package StoneKit.Configuration.IniParser
Getting Started
Loading INI File
// Create an instance of IniFile and load data from the specified file
var iniFile = new IniFile();
iniFile.LoadFile("path/to/your/file.ini");
// Alternatively, use the static method to quickly load information from an INI file
var quickIniFile = IniFile.Parse("path/to/your/file.ini");
Accessing Configuration Values
// Retrieve a value from a specific section and key
string? value = iniFile["SectionName", "KeyName"];
// Retrieve a value with a default if not found
string defaultValue = iniFile["SectionName", "KeyName", "Default"];
// Get an array of section names
string[] sections = iniFile.Sections;
// Get an array of key names in a specific section
string[] keysInSection = iniFile.GetKeys("SectionName");
Example INI File
; Example INI File
[Database]
Server=localhost
Port=5432
DatabaseName=mydatabase
Username=myuser
Password=mypassword
[AppSettings]
LogLevel=Info
MaxConnections=100
Contributions
Contributions, issues, and feature requests are welcome. Feel free to submit a pull request or open an issue on GitHub.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Product | Versions 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. |
-
net8.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.24.603.121931 | 42 | 6/3/2024 |
1.24.317.170730 | 71 | 3/17/2024 |
1.24.317.170544 | 59 | 3/17/2024 |
1.24.317.164648 | 71 | 3/17/2024 |
1.24.317.161355 | 64 | 3/17/2024 |
1.24.121.184215 | 87 | 1/21/2024 |
1.24.121.182729 | 74 | 1/21/2024 |