MadMilkman.Ini
Defines comment's starting character.
Use ';' as comment's starting character.
Use '#' as comment's starting character.
Defines a behaviour for duplicate occurences.
Allow duplicate names in .
Disallow duplicate names in .
is thrown on duplicate name occurence.
Ignore duplicate names.
Prevents adding or inserting an if its name already exists in .
Defines key's name and value delimiter character.
Use '=' as key's name and value delimiter character.
Use ':' as key's name and value delimiter character.
Defines section's wrapper characters around its name.
Use '[' and ']' as section's wrapper characters.
Use '<' and '>' as section's wrapper characters.
Use '{' and '}' as section's wrapper characters.
Use '(' and ')' as section's wrapper characters.
In-memory representation of an INI file.
is a central class of MadMilkman.Ini component.
To define an INI file's format use object.
To load (read) an INI file from a file's path or a stream use IniFile.Load methods.
To save (write) an INI file to a file's path or a stream use IniFile.Save methods.
To view INI file's structure representation see IniFile's Content Hierarchy Diagram.
Overview
INI file format on Wikipedia.
Initializes a new instance of class.
Initializes a new instance of class.
object that defines INI file's format, settings for both Load and Save methods.
Loads a file from a path.
Path from which to load a file.
Loads a file from a stream.
Stream from which to load a file.
Loads a file from a reader.
Reader from which to load a file.
Saves a file to a path.
Path to which to save a file.
Saves a file to a stream.
Stream to which to save a file.
Saves a file to a writer.
Writer to which to save a file.
Gets file's sections.
Gets the mappings of s and their results, used in methods.
Gets the object that exposes binding operations, which are executed with methods.
Represents a base generic class for INI content item collections, and .
derived type.
Adds an item to the end of this collection.
Item to add to this collection.
If item duplicates are ignored and this item is a duplicate, has an existing name in this collection, then it is not added.
Removes all items from this collection.
Determines whether an item is in this collection.
Item to locate in this collection.
if the specified item is in the collection.
Determines whether an item is in this collection.
Name of the item to locate in this collection.
if the item with specified name is in the collection.
Shallow copies the items of this collection to an array.
One-dimensional array that is the destination of the items copied from this collection.
Zero-based index in array at which copying begins.
Searches for the specified item and returns the zero-based index of the first occurrence within this collection.
Item to locate in this collection.
Index of the first occurrence of specified item in the collection.
Searches for the specified item and returns the zero-based index of the first occurrence within this collection.
Name of the item to locate in this collection.
Index of the first occurrence of the item with specified name in the collection.
Inserts an item to this collection at the specified index.
Zero-based index at which item should be inserted.
Item to insert to this collection.
If item duplicates are ignored and this item is a duplicate, has an existing name in this collection, then it is not inserted.
Removes the first occurrence of specific item from this collection.
Item to remove from this collection.
if the specified item is removed from the collection.
Removes the first occurrence of specific item from this collection.
Name of the item to remove from this collection.
if the item with specified name is removed from the collection.
Removes an item at the specified index from this collection.
Zero-based index at which item should be inserted.
Returns an enumerator that iterates through the collection.
object that can be used to iterate through the collection.
Gets the number of items in this collection.
Gets or sets the item at the specified index.
Zero-based index of the item to get or set.
If item duplicates are ignored and value is a duplicate item, has an existing name in this collection, then this value is ignored.
Gets the first item of the specified name.
Name of the item to get.
If item with the specified name doesn't exist a value is returned.
Gets the first items of the specified names.
Names of the items to get.
If item with any specified name doesn't exist a value is returned in its place.
Represents a collection of items.
Adds an item to the end of this collection.
Name of the to add to this collection.
that was added to this collection.
If item duplicates are ignored and this item is a duplicate, has an existing name in this collection, then it is not added.
Adds an item to the end of this collection.
The key's data, pair of key's name and key's value, to add to this collection.
that was added to this collection.
If item duplicates are ignored and this item is a duplicate, has an existing name in this collection, then it is not added.
Adds an item to the end of this collection.
Name of the to add to this collection.
Value of the to add to this collection.
that was added to this collection.
If item duplicates are ignored and this item is a duplicate, has an existing name in this collection, then it is not added.
Inserts an item to this collection at the specified index.
Zero-based index at which item should be inserted.
Name of the to insert to this collection.
that was inserted to this collection.
If item duplicates are ignored and this item is a duplicate, has an existing name in this collection, then it is not inserted.
Inserts an item to this collection at the specified index.
Zero-based index at which item should be inserted.
The key's data, pair of key's name and key's value, to insert to this collection.
that was inserted to this collection.
If item duplicates are ignored and this item is a duplicate, has an existing name in this collection, then it is not inserted.
Inserts an item to this collection at the specified index.
Zero-based index at which item should be inserted.
Name of the to insert to this collection.
Value of the to insert to this collection.
that was inserted to this collection.
If item duplicates are ignored and this item is a duplicate, has an existing name in this collection, then it is not inserted.
Represents a comment object used by objects, and .
Gets or sets the amount of empty lines before this comment's text.
Gets or sets the amount of whitespace characters before this comment's text.
Gets or sets a text of this instance.
For LeadingComment text should not contain new line characters.
If it does, they will be replaced with a space characters.
Represents a base class for INI content items, and .
All INI items share the same content like , and .
These properties are defined on an class, a base class for INI content items.
Gets and sets the name of the current .
When setting the value is verified by the item's rule.
Gets or sets the amount of whitespace characters before this item's name.
Gets the object that represents a comment that follows this on the same line.
Gets the object that represents a comments that occur before this .
Gets the to which this belongs to.
Represents a key item of the INI file with name and value content.
Initializes a new instance of the class.
The owner file.
The key's name.
Initializes a new instance of the class.
The owner file.
The key's name.
The key's value.
Initializes a new instance of the class.
The owner file.
The key's data, pair of key's name and key's value.
Copies this instance.
Copied .
IniItem's Copying
Copies this instance and sets copied instance's ParentFile.
Copied key's parent file.
Copied that belongs to a specified .
IniItem's Copying
Indicates whether the can be converted to specified type.
Type of the object to convert the to.
if the specified type is supported.
Currently supported types are:
- System.Boolean
- System.Byte
- System.SByte
- System.Int16
- System.UInt16
- System.Int32
- System.UInt32
- System.Int64
- System.UInt64
- System.Char
- System.Single
- System.Double
- System.Decimal
- System.DateTime
- System.TimeSpan
- System.Enum
- System.String
Additionally both Array and List of the above types are supported.
Converts the to an instance of the specified type.
Uninitialized instance of a specific type which will hold the converted value if the conversion succeeds.
Type of the object to convert the to.
Value that indicates whether the conversion succeeded.
For supported types see the remarks of method.
Mapped value results in have priority over parsing the value.
IniKey's Value Parsing
Converts the to an array of the specified type.
Uninitialized array of a specific type which will hold the converted values if the conversion succeeds.
Type of the objects in array to convert the to.
Value that indicates whether the conversion succeeded.
For supported types see the remarks of method.
Mapped value results in have priority over parsing the value.
IniKey's Value Parsing
Converts the to a list of the specified type.
Uninitialized list of a specific type which will hold the converted values if the conversion succeeds.
Type of the objects in list to convert the to.
Value that indicates whether the conversion succeeded.
For supported types see the remarks of method.
Mapped value results in have priority over parsing the value.
IniKey's Value Parsing
Gets and sets value.
IniKey's Value Parsing
IniKey's Value Binding
Gets the to which this belongs to.
Gets the to which this belongs to.
Represents a section item of the INI file with name and keys content.
Represents a section name which is used to define a global section, used for storing first keys series that don't belong to any section.
If a section with this name is located as a first file's section then its name and comments are ignored.
If a section with this name isn't located as first file's section then it will be written with MADMILKMAN_INI_FILE_GLOBAL_SECTION name.
Initializes a new instance of the class.
The owner file.
The section's name.
Initializes a new instance of the class.
The owner file.
The section's name.
The section's keys.
Initializes a new instance of the class.
The owner file.
The section's name.
The section's keys data, pairs of key's name and key's value.
Initializes a new instance of the class.
The owner file.
The section's name.
The section's keys.
Copies this instance.
Copied .
IniItem's Copying
Copies this instance and sets copied instance's ParentFile.
Copied section's parent file.
Copied that belongs to a specified .
IniItem's Copying
Serializes the specified object into this .
The type of serialized object.
The object to serialize.
IniSection's Object Serialization
Deserializes this into an object of specified type.
The type of deserialized object.
The object being deserialized.
IniSection's Object Serialization
Gets the section's key collection.
Gets the to which this belongs to.
Represents a class that defines INI file's format, stores properties used for both reading and writing a file.
After an instance of this class is passed to an constructor, further changes on that instance's properties will have no effect.
Property
Default Value
-
CommentStarter
-
Compression
-
EncryptionPassword
-
Encoding
Encoding.ASCII
-
KeyDelimiter
-
KeyDuplicate
-
KeyNameCaseSensitive
-
KeySpaceAroundDelimiter
-
SectionDuplicate
-
SectionNameCaseSensitive
-
SectionWrapper
Initializes a new instance of the class.
Gets or sets encoding for reading and writing an INI file.
Value should not be , if it is then a default Encoding.ASCII value will be used.
Gets or sets comments starting character.
Gets or sets a value indicating if file's size is reduced.
If file is decompressed on Load and compressed on Save.
Gets or sets an INI file's protection password.
File is decrypted on Load and encrypted on Save if a password is not or .
Gets or sets keys name and value delimiter character.
Gets or sets a value indicating whether keys with same name are allowed, disallowed or ignored.
Gets or sets a value indicating whether keys name are case sensitive.
Gets or sets a value indicating whether space is written around the keys delimiter.
Gets or sets a value indicating whether sections with same name are allowed, disallowed or ignored.
Gets or sets a value indicating whether sections name are case sensitive.
Gets or sets wrapper characters of sections name.
Represents a collection of items.
Adds an item to the end of this collection.
Name of the to add to this collection.
that was added to this collection.
If item duplicates are ignored and this item is a duplicate, has an existing name in this collection, then it is not added.
Adds an item to the end of this collection.
Name of the to add to this collection.
The section's keys data, pairs of key's name and key's value, to add to this collection.
that was added to this collection.
If item duplicates are ignored and this item is a duplicate, has an existing name in this collection, then it is not added.
Inserts an item to this collection at the specified index.
Zero-based index at which item should be inserted.
Name of the to insert to this collection.
that was inserted to this collection.
If item duplicates are ignored and this item is a duplicate, has an existing name in this collection, then it is not inserted.
Inserts an item to this collection at the specified index.
Zero-based index at which item should be inserted.
Name of the to insert to this collection.
The section's keys data, pairs of key's name and key's value, to insert to this collection.
that was inserted to this collection.
If item duplicates are ignored and this item is a duplicate, has an existing name in this collection, then it is not inserted.
Indicates the behavior of public property when serializing or deserializing the object that contains it.
Initializes a new instance of the IniSerializationAttribute class and specifies the 's name.
The name of the generated .
Initializes a new instance of the IniSerializationAttribute class and specifies if serialization is ignored.
The value indicating whether serialization is ignored.
Gets the name of serialized the property.
Gets the value indicating whether serialization is ignored.
Represents a class that is used for binding operations, an operation in which the placeholder keys values are replaced with an internal or external data.
can be accessed through property.
Binding can be executed with internal data source or with a provided external data source.
For more information see IniKey's Value Binding.
IniKey's Value Binding
Executes a binding operation with internal data source.
IniKey's Value Binding
Executes a binding operation with external data source.
The binding data source.
IniKey's Value Binding
Executes a binding operation with external data source, only on specified section.
The binding data source.
The 's name.
IniKey's Value Binding
Occurs when a placeholder is binding with data source value and can be used to customize the binding operation.
Provides data for event.
Gets the placeholder's name.
Gets the placeholder's .
Gets or sets the data source value that will replace the placeholder.
The data source value that will replace the placeholder, if it's not .
Gets a value indicating whether value was found in the data source.
if value was found in the data source.
Represents a class of mapped s and their results, used in methods.
can be accessed through property.
Mapped value results have priority over parsing the value.
For more information see IniKey's Value Parsing.
IniKey's Value Parsing
Adds a new mapping of to resulting object of parse methods.
The key's value.
The object that represents parsed .
Type of the object that represents parsed .
The key's value cannot be .
The mapped result's type must be one of the supported types for parsing, see the remarks of method.
Collection cannot contain multiple entries of same key's value, value comparison is case-insensitive.
Determines whether the collection contains a mapping for a specified key's value.
The key's value to locate in the collection.
if the collection contains a mapping for a specified key's value.
Removes a mapping for a specified key's value in the collection.
The key's value to remove in the collection.
if a mapping for a specified key's value is successfully found and removed.