Show / Hide Table of Contents

Class TomlTable

Inheritance
System.Object
TomlObject
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
TomlObject.Comments
TomlObject.AddComment(TomlComment)
TomlObject.AddComment(String, CommentLocation)
TomlObject.AddComments(IEnumerable<TomlComment>)
TomlObject.ClearComments()
TomlObject.Get<T>()
TomlObject.CopyComments<T>(T, TomlObject)
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
Type Description
TomlObject
| 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
TomlObject.ReadableTypeName
| 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
Type Description
TomlTable.TableTypes
| Improve this Doc View Source

TomlType

Declaration
public override TomlObjectType TomlType { get; }
Property Value
Type Description
TomlObjectType
Overrides
TomlObject.TomlType
| 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
public void Clear()
| 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
Type Name Description
System.Func<ITargetSelector, ITableCombiner> operation

Lambda used to configure the operation that should be performed.

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.

Remarks

The given lambda is used to configure what combination operation should be performed.

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
public bool Freeze()
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
Type Description
TomlObject
| 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
TomlObject.Get(Type)
| Improve this Doc View Source

Get<T>(String)

Declaration
public T Get<T>(string key)
Parameters
Type Name Description
System.String key
Returns
Type Description
T
Type Parameters
Name Description
T
| 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
Type Description
TomlObject
| 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
Type Name Description
ITomlObjectVisitor visitor
Overrides
TomlObject.Visit(ITomlObjectVisitor)

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

TomlObjectFactory.Add(TomlTable, String, Boolean)
TomlObjectFactory.Add(TomlTable, String, String)
TomlObjectFactory.Add(TomlTable, String, Int64)
TomlObjectFactory.Add(TomlTable, String, Int32)
TomlObjectFactory.Add(TomlTable, String, Double)
TomlObjectFactory.Add(TomlTable, String, Single)
TomlObjectFactory.Add(TomlTable, String, DateTimeOffset)
TomlObjectFactory.Add(TomlTable, String, TimeSpan)
TomlObjectFactory.Add(TomlTable, String, IEnumerable<Boolean>)
TomlObjectFactory.Add(TomlTable, String, IEnumerable<String>)
TomlObjectFactory.Add(TomlTable, String, IEnumerable<Int64>)
TomlObjectFactory.Add(TomlTable, String, IEnumerable<Int32>)
TomlObjectFactory.Add(TomlTable, String, IEnumerable<Double>)
TomlObjectFactory.Add(TomlTable, String, IEnumerable<Single>)
TomlObjectFactory.Add(TomlTable, String, IEnumerable<DateTimeOffset>)
TomlObjectFactory.Add(TomlTable, String, IEnumerable<DateTime>)
TomlObjectFactory.Add(TomlTable, String, IEnumerable<TimeSpan>)
TomlObjectFactory.Add<T>(TomlTable, String, IDictionary<String, T>, TomlTable.TableTypes)
TomlObjectFactory.Add(TomlTable, String, Object, TomlTable.TableTypes)
TomlObjectFactory.Add<T>(TomlTable, String, IEnumerable<T>, TomlTable.TableTypes)
TomlObjectFactory.Add<T>(TomlTable, String, T, TomlObjectFactory.RequireTomlObject<T>)
TomlObjectFactory.CreateAttached(TomlObject, Boolean)
TomlObjectFactory.CreateAttached(TomlObject, String)
TomlObjectFactory.CreateAttached(TomlObject, Int64)
TomlObjectFactory.CreateAttached(TomlObject, Double)
TomlObjectFactory.CreateAttached(TomlObject, TimeSpan)
TomlObjectFactory.CreateAttached(TomlObject, DateTimeOffset)
TomlObjectFactory.CreateAttached(TomlObject, IEnumerable<Boolean>)
TomlObjectFactory.CreateAttached(TomlObject, IEnumerable<String>)
TomlObjectFactory.CreateAttached(TomlObject, IEnumerable<Int64>)
TomlObjectFactory.CreateAttached(TomlObject, IEnumerable<Int32>)
TomlObjectFactory.CreateAttached(TomlObject, IEnumerable<Double>)
TomlObjectFactory.CreateAttached(TomlObject, IEnumerable<Single>)
TomlObjectFactory.CreateAttached(TomlObject, IEnumerable<TimeSpan>)
TomlObjectFactory.CreateAttached(TomlObject, IEnumerable<DateTime>)
TomlObjectFactory.CreateAttached(TomlObject, IEnumerable<DateTimeOffset>)
TomlObjectFactory.CreateAttached(TomlObject, Object, TomlTable.TableTypes)
TomlObjectFactory.CreateAttached<TValue>(TomlObject, IDictionary<String, TValue>, TomlTable.TableTypes)
TomlObjectFactory.CreateAttached<T>(TomlObject, IEnumerable<T>, TomlTable.TableTypes)
TomlObjectFactory.CreateEmptyAttachedArray(TomlObject)
TomlObjectFactory.CreateEmptyAttachedTableArray(TomlObject)
TomlObjectFactory.CreateEmptyAttachedTable(TomlObject, TomlTable.TableTypes)
TomlObjectFactory.Update(TomlTable, String, Boolean)
TomlObjectFactory.Update(TomlTable, String, String)
TomlObjectFactory.Update(TomlTable, String, Int64)
TomlObjectFactory.Update(TomlTable, String, Double)
TomlObjectFactory.Update(TomlTable, String, DateTimeOffset)
TomlObjectFactory.Update(TomlTable, String, TimeSpan)
TomlObjectFactory.Update<T>(TomlTable, String, IDictionary<String, T>, TomlTable.TableTypes)
TomlObjectFactory.Update(TomlTable, String, Object, TomlTable.TableTypes)
TomlObjectFactory.Update<T>(TomlTable, String, IEnumerable<T>, TomlTable.TableTypes)
TomlObjectFactory.Update(TomlTable, String, IEnumerable<Boolean>)
TomlObjectFactory.Update(TomlTable, String, IEnumerable<String>)
TomlObjectFactory.Update(TomlTable, String, IEnumerable<Int64>)
TomlObjectFactory.Update(TomlTable, String, IEnumerable<Int32>)
TomlObjectFactory.Update(TomlTable, String, IEnumerable<Double>)
TomlObjectFactory.Update(TomlTable, String, IEnumerable<Single>)
TomlObjectFactory.Update(TomlTable, String, IEnumerable<DateTimeOffset>)
TomlObjectFactory.Update(TomlTable, String, IEnumerable<DateTime>)
TomlObjectFactory.Update(TomlTable, String, IEnumerable<TimeSpan>)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX