Giter VIP home page Giter VIP logo

madmilkman.ini's Introduction

MadMilkman.Ini component's icon MadMilkman.Ini

MadMilkman.Ini is a .NET component which simplifies processing of INI files and requires only a minimum .NET Framework version 2.0. It is 100% managed code (C#), compatible with Mono framework, which provides an easy to use programming interface.

Advantages:

  • Enables reading and writing of various INI file formats.
  • Enables easy manipulation of INI file's content.
  • Enables copying and merging multiple INI file's contents.
  • Enables encrypting and decrypting INI files.
  • Enables compressing and decompressing INI files.
  • Enables serializing and deserializing custom types into an INI content.

Installation:

You can use this component in any way that suits you:

PM> Install-Package MadMilkman.Ini

First steps:

  1. Create new .NET project.
  2. Add new reference to MadMilkman.Ini.dll.
  3. Add MadMilkman.Ini namespace.
  • C# - using MadMilkman.Ini;
  • VB.NET - Import MadMilkman.Ini
  • C++/CLI - using namespace MadMilkman::Ini;
  1. Write some INI files processing code.
  • Use code samples located in MadMilkman.Ini.Samples, written in C#, VB.NET and C++/CLI as starting point.
  • Read MadMilkman.Ini.Documentation.chm to learn more about the component and its API references.

Feedback & Support:

Please feel free to contact me with any questions, suggestions or issues regarding the MadMilkman.Ini component, I will be more than happy to provide a help. Also if you found the component useful or useless I would be interested in hearing about it.

Overview

MadMilkman.Ini provides a simple and intuitive programming interface which makes it very easy to create new or process existing INI files. Because INI file format is loosely defined and has no real standard, different files can have different format. By default MadMilkman.Ini processes the following format (however it is possible to define a custom formatting via IniOptions class):

;Section trailing comment
[Section name]
Key name = Key value ;Key leading comment

C#

// Create new file with a default formatting.
IniFile file = new IniFile();

// Add new section.
IniSection section = file.Sections.Add("Section name");
// Add trailing comment.
section.TrailingComment.Text = "Section trailing comment";

// Add new key and its value.
IniKey key = section.Keys.Add("Key name", "Key value ");
// Add leading comment.
key.LeadingComment.Text = "Key leading comment";
            
// Save file.
file.Save("Sample.ini");

VB.NET

' Create new file with a default formatting.
Dim file As New IniFile()

' Add new section.
Dim section As IniSection = file.Sections.Add("Section name")
' Add trailing comment.
section.TrailingComment.Text = "Section trailing comment"

' Add new key and its value.
Dim key As IniKey = section.Keys.Add("Key name", "Key value ")
' Add leading comment.
key.LeadingComment.Text = "Key leading comment"

' Save file.
file.Save("Sample.ini")

C++/CLI

// Create new file with a default formatting.
IniFile^ file = gcnew IniFile();

// Add new section.
IniSection^ section = file->Sections->Add("Section name");
// Add trailing comment.
section->TrailingComment->Text = "Section trailing comment";

// Add new key and its value.
IniKey^ key = section->Keys->Add("Key name", "Key value ");
// Add leading comment.
key->LeadingComment->Text = "Key leading comment";

// Save file.
file->Save("Sample.ini");

Compression feature enables you to reduce INI file's size.

Encryption feature enables you to protect INI file by providing an encryption password.

Parsing feature enables you to retrieve the key's value as an instance of a specific type via key's TryParseValue method, all currently supported types are listed in key's IsSupportedValueType method remarks.

Binding feature enables you to define placeholders inside a key's value which can be binded (replaced) with an internal or external data source via Bind() method.

Serialization feature enables you to serialize an object into section's keys.

More details can be found in MadMilkman.Ini.Documentation.chm.

madmilkman.ini's People

Contributors

arfon avatar marioz avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.