seztion-parser 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package seztion-parser --version 1.0.0                
NuGet\Install-Package seztion-parser -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="seztion-parser" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add seztion-parser --version 1.0.0                
#r "nuget: seztion-parser, 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 seztion-parser as a Cake Addin
#addin nuget:?package=seztion-parser&version=1.0.0

// Install seztion-parser as a Cake Tool
#tool nuget:?package=seztion-parser&version=1.0.0                

seztion-parser

seztion-parser-logo

seztion-parser seztion-parser seztion-parser

seztion-parser is a class library used to read data from each section of a file (the file extension can be any, e.g. .INI).

There is a history behind why this library exists.

Some time ago I was creating a gamemode in SA-MP (San Andreas Multiplayer, a multiplayer mod for GTA San Andrea) that was based on two teams (Alpha and Beta), so I needed to somehow store the spawn positions (is the location where the player appears on the map) of a given map (the place where the player plays).

Then it occurred to me that I could save the spawn positions in a file in this way:

#section(1)
[Alpha]
#spawn positions - Alpha Team:
2548.7009,-1283.2224,1060.9844,230.3022
2565.8301,-1281.7773,1065.3672,238.1356
2575.7759,-1283.3206,1065.3672,177.9750
2580.8525,-1284.6443,1065.3579,88.0476
2568.5518,-1283.6564,1060.9844,181.0851

#section(2)
[Beta]
#spawn positions - Beta Team:
2532.1660,-1283.6971,1031.4219,270.0725
2532.5823,-1292.2178,1031.4219,275.7126
2532.9485,-1302.3477,1031.4219,269.4458
2541.2852,-1303.9135,1031.4219,269.4458
2542.1389,-1293.7726,1031.4219,262.8658

And this is where the seztion-parzer library comes into play, as it is simple to extract this data with this library. I didn't want to use a database for this, I wanted something very simple and this is what I came up with at the time.

Don't forget to visit the official library website where you can find API documentation, articles and diagrams.

Installation

If you're an hardcore and want to do it manually, you must add the following to the csproj file:

<PackageReference Include="seztion-parser" Version="1.0.0" />

If you're want to install the package from Visual Studio, you must open the project/solution in Visual Studio, and open the console using the Tools > NuGet Package Manager > Package Manager Console command and run the install command:

Install-Package seztion-parser

If you are making use of the dotnet CLI, then run the following in your terminal:

dotnet add package seztion-parser

Usage

//Import all namespace types
using SeztionParser.Facades;
//...
//Load the sections file.
var sections = SectionsFile.Load("my_file.ini");
//This prints the data of the "Alpha" section.
foreach (var data in sections["Alpha"])
    Console.WriteLine(data);

For more information, see the articles.

Contribution

If you want to contribute in this project, simply fork the repository, make changes and then create a pull request.

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 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 is compatible. 
.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.
  • .NETStandard 2.1

    • 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
3.0.0 891 7/27/2024
2.0.0 111 7/6/2024
1.0.2 389 11/23/2022
1.0.1 370 11/7/2021
1.0.0 404 11/5/2021