|
Nuke.Unreal
Build Unreal apps in Style.
|
Represents a section block in an Unreal INI configuration under a [SectionName] header.
More...
Public Member Functions | |
| void | SetLine (string line, int order) |
| Parse an entire config item (or a line) as a command and add it to this section. | |
| void | Remove (IEnumerable< string > keys) |
| Remove all given keys from this section. | |
| void | Remove (params string[] keys) |
| Remove all given keys from this section. | |
| ConfigCommand | GetFirst (string key, ConfigCommand fallback=default) |
| Gets a config item in this section with specified key. | |
| void | Set (string key, string value, CommandType type=CommandType.Set) |
| Set or add an individual config item. | |
| void | Merge (ConfigSection from) |
| Merge another section into this one, overriding existing values and adding new ones. | |
| string | Serialize () |
| Convert this section to INI format. | |
| ConfigSection | Copy () |
| Deep copy this section. | |
Properties | |
| int | Order [get, set] |
| Maintain the original position for this section as they were in the source file so serialization doesn't introduce that much unnecessary changes. | |
| string? | Name [get, set] |
| Section name without square brackets. | |
| List< ConfigCommand > | Commands = new() [get, private set] |
| Individual config items underneath this section. Here it's referred to as commands because Unreal INI config items can procedurally add or remove items from containers. | |
| IEnumerable< ConfigCommand > | this[string key] [get] |
| Get all commands matching given name. | |
Represents a section block in an Unreal INI configuration under a [SectionName] header.
Definition at line 10 of file ConfigSection.cs.
| ConfigSection Nuke.Unreal.Ini.ConfigSection.Copy | ( | ) |
Deep copy this section.
| ConfigCommand Nuke.Unreal.Ini.ConfigSection.GetFirst | ( | string | key, |
| ConfigCommand | fallback = default ) |
Gets a config item in this section with specified key.
| key | |
| fallback |
| void Nuke.Unreal.Ini.ConfigSection.Merge | ( | ConfigSection | from | ) |
Merge another section into this one, overriding existing values and adding new ones.
Definition at line 102 of file ConfigSection.cs.
| void Nuke.Unreal.Ini.ConfigSection.Remove | ( | IEnumerable< string > | keys | ) |
Remove all given keys from this section.
Definition at line 64 of file ConfigSection.cs.
| void Nuke.Unreal.Ini.ConfigSection.Remove | ( | params string[] | keys | ) |
Remove all given keys from this section.
| string Nuke.Unreal.Ini.ConfigSection.Serialize | ( | ) |
| void Nuke.Unreal.Ini.ConfigSection.Set | ( | string | key, |
| string | value, | ||
| CommandType | type = CommandType::Set ) |
Set or add an individual config item.
| key | Name of the config item |
| value | Associated value after = sign. |
| type | Command type of config item. |
Definition at line 91 of file ConfigSection.cs.
| void Nuke.Unreal.Ini.ConfigSection.SetLine | ( | string | line, |
| int | order ) |
Parse an entire config item (or a line) as a command and add it to this section.
| line | |
| order | Maintain the original position for this section as they were in the source file so serialization doesn't introduce that much unnecessary changes. |
Definition at line 45 of file ConfigSection.cs.
|
getprivate set |
Individual config items underneath this section. Here it's referred to as commands because Unreal INI config items can procedurally add or remove items from containers.
Definition at line 27 of file ConfigSection.cs.
|
getset |
Section name without square brackets.
Definition at line 21 of file ConfigSection.cs.
|
getset |
Maintain the original position for this section as they were in the source file so serialization doesn't introduce that much unnecessary changes.
Definition at line 16 of file ConfigSection.cs.
|
get |
Get all commands matching given name.
Definition at line 35 of file ConfigSection.cs.