Class TomlTable
Inheritance
System.Object
TomlTable
Implements
System.Collections.Generic.IDictionary<
System.String,
TomlObject>
System.Collections.Generic.ICollection<
System.Collections.Generic.KeyValuePair<
System.String,
TomlObject>>
System.Collections.Generic.IEnumerable<
System.Collections.Generic.KeyValuePair<
System.String,
TomlObject>>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Nett
Assembly: Nett.dll
Syntax
public class TomlTable : TomlObject, IDictionary<string, TomlObject>, ICollection<KeyValuePair<string, TomlObject>>, IEnumerable<KeyValuePair<string, TomlObject>>, IEnumerable
Properties
|
Improve this Doc
View Source
Count
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Item[String]
Declaration
public TomlObject this[string key] { get; set; }
Parameters
Type |
Name |
Description |
System.String |
key |
|
Property Value
|
Improve this Doc
View Source
Keys
Declaration
public ICollection<string> Keys { get; }
Property Value
Type |
Description |
System.Collections.Generic.ICollection<System.String> |
|
|
Improve this Doc
View Source
ReadableTypeName
Declaration
public override string ReadableTypeName { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
|
Improve this Doc
View Source
Rows
Declaration
public IEnumerable<KeyValuePair<string, TomlObject>> Rows { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, TomlObject>> |
|
|
Improve this Doc
View Source
TableType
Declaration
public TomlTable.TableTypes TableType { get; }
Property Value
|
Improve this Doc
View Source
TomlType
Declaration
public override TomlObjectType TomlType { get; }
Property Value
Overrides
|
Improve this Doc
View Source
Values
Declaration
public ICollection<TomlObject> Values { get; }
Property Value
Type |
Description |
System.Collections.Generic.ICollection<TomlObject> |
|
Methods
|
Improve this Doc
View Source
Clear()
Declaration
|
Improve this Doc
View Source
Combine(Func<ITargetSelector, ITableCombiner>)
Allows to combine two TOML tables to a new result table.
Declaration
public static TomlTable Combine(Func<ITargetSelector, ITableCombiner> operation)
Parameters
Returns
Type |
Description |
TomlTable |
A new TomlTable instance containing the table resulting from the operation. The new table will
be a completely new deep clone of the original tables/rows.
|
Examples
var x = Toml.Create(); // Assume rows are added to X
var y = Toml.Create(); // Assume rows are added to Y
// Create table that has all rows of X + rows of Y that had no equivalent in row in X
var r1 = Toml.CombineTables(op => op.Overwrite(X).With(Y).ForRowsOnlyInSource());
// Create table that has all rows of X overwritten with the
// equivalent rows from Y and added all rows that had no equivalent row in X yet
var r2 = Toml.CombineTables(op => op.Overwrite(X).With(Y).ForAllSourceRows());
// Create table that has all rows of X overwritten with the
// equivalent row of Y, if such a row existed in Y
var r3 = Toml.CombineTables(op => op.Overwrite(X).With(Y).ForAllTargetRows());
// These operations create the following tables
// Key | X | Y | r1 | r2 | r3
// ------------------------------
// a | 1 | | 1 | 1 | 1
// b | | 2 | 2 | 2 |
// c | 3 | 4 | 3 | 4 | 4
|
Improve this Doc
View Source
Contains(KeyValuePair<String, TomlObject>)
Declaration
public bool Contains(KeyValuePair<string, TomlObject> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.String, TomlObject> |
item |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ContainsKey(String)
Declaration
public bool ContainsKey(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
CopyTo(KeyValuePair<String, TomlObject>[], Int32)
Declaration
public void CopyTo(KeyValuePair<string, TomlObject>[] array, int arrayIndex)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.String, TomlObject>[] |
array |
|
System.Int32 |
arrayIndex |
|
|
Improve this Doc
View Source
Freeze()
Declaration
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Get(String)
Declaration
public TomlObject Get(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
|
Improve this Doc
View Source
Get(Type)
Declaration
public override object Get(Type t)
Parameters
Type |
Name |
Description |
System.Type |
t |
|
Returns
Type |
Description |
System.Object |
|
Overrides
|
Improve this Doc
View Source
Get<T>(String)
Declaration
public T Get<T>(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetEnumerator()
Declaration
public IEnumerator<KeyValuePair<string, TomlObject>> GetEnumerator()
Returns
Type |
Description |
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, TomlObject>> |
|
|
Improve this Doc
View Source
OnRowValueSet(String)
Declaration
protected virtual void OnRowValueSet(string rowKey)
Parameters
Type |
Name |
Description |
System.String |
rowKey |
|
|
Improve this Doc
View Source
Remove(KeyValuePair<String, TomlObject>)
Declaration
public bool Remove(KeyValuePair<string, TomlObject> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.String, TomlObject> |
item |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Remove(String)
Declaration
public bool Remove(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ToDictionary()
Declaration
public Dictionary<string, object> ToDictionary()
Returns
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
TryGetValue(String)
Declaration
public TomlObject TryGetValue(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
|
Improve this Doc
View Source
TryGetValue(String, out TomlObject)
Declaration
public bool TryGetValue(string key, out TomlObject value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
TomlObject |
value |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Visit(ITomlObjectVisitor)
Declaration
public override void Visit(ITomlObjectVisitor visitor)
Parameters
Overrides
Explicit Interface Implementations
|
Improve this Doc
View Source
ICollection<KeyValuePair<String, TomlObject>>.Add(KeyValuePair<String, TomlObject>)
Declaration
void ICollection<KeyValuePair<string, TomlObject>>.Add(KeyValuePair<string, TomlObject> item)
Parameters
Type |
Name |
Description |
System.Collections.Generic.KeyValuePair<System.String, TomlObject> |
item |
|
|
Improve this Doc
View Source
IDictionary<String, TomlObject>.Add(String, TomlObject)
Declaration
void IDictionary<string, TomlObject>.Add(string key, TomlObject value)
Parameters
Type |
Name |
Description |
System.String |
key |
|
TomlObject |
value |
|
|
Improve this Doc
View Source
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type |
Description |
System.Collections.IEnumerator |
|
Implements
System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Extension Methods