YamlMapping Class

Inheritance
YamlContainer YamlMapping
Implements

Constructors

NameDescription
YamlMapping()Initializes a new instance of this type.

YamlMapping()

YamlMapping.cs

Initializes a new instance of this type.

public YamlMapping()

Properties

NameDescription
AnchorGets anchor.
CountGets count.
IsCanonicalGets a value indicating whether is Canonical.
IsImplicitGets is Implicit.
IsReadOnlyGets a value indicating whether is Read Only.
KeysGets keys.
MappingStartGets mapping Start.
StyleGets style.
TagGets tag.
ValuesGets values.

Gets anchor.

public override string? Anchor { get; set; }

Property value

string?

Gets count.

public int Count { get; }

Property value

int

IsCanonical

YamlMapping.cs

Gets a value indicating whether is Canonical.

public override bool IsCanonical { get; }

Property value

bool

IsImplicit

YamlMapping.cs

Gets is Implicit.

public override bool IsImplicit { get; set; }

Property value

bool

IsReadOnly

YamlMapping.cs

Gets a value indicating whether is Read Only.

public bool IsReadOnly { get; }

Property value

bool

Gets keys.

public ICollection<YamlElement> Keys { get; }

Property value

ICollection<YamlElement>

Remarks

The collection is read-only; use the mapping members to add or remove entries.

MappingStart

YamlMapping.cs

Gets mapping Start.

public MappingStart MappingStart { get; set; }

Property value

MappingStart

Gets style.

public override YamlStyle Style { get; set; }

Property value

YamlStyle

Gets tag.

public override string? Tag { get; set; }

Property value

string?

Gets values.

public ICollection<YamlElement?> Values { get; }

Property value

ICollection<YamlElement?>

Remarks

The values are listed in the same order as YamlMapping.Keys.

Indexers

NameDescription
this[YamlElement]Gets or sets an element at the specified index.
this[int]Gets or sets an element at the specified index.
this[string]Gets or sets an element at the specified index.

Item overloads

this[YamlElement]

YamlMapping.cs

Gets or sets an element at the specified index.

public YamlElement? this[YamlElement key] { get; set; }
Parameters
key YamlElement
Property value

YamlElement?

Gets or sets an element at the specified index.

public KeyValuePair<YamlElement, YamlElement?> this[int index] { get; set; }
Parameters
index int
Property value

KeyValuePair<YamlElement, YamlElement?>

this[string]

YamlMapping.cs

Gets or sets an element at the specified index.

public YamlElement? this[string key] { get; set; }
Parameters
key string
Property value

YamlElement?

Methods

NameDescription
Add(YamlElement, YamlElement?)Adds an item.
Clear()Removes all elements from the collection.
ContainsKey(YamlElement)Determines whether key.
ContainsKey(string)Determines whether key.
DeepClone()Creates a deep clone of the current value.
GetEnumerator()Gets enumerator.
IndexOf(KeyValuePair<YamlElement, YamlElement?>)Gets the zero-based index of the specified item.
Insert(int, KeyValuePair<YamlElement, YamlElement?>)Inserts an item at the specified index.
Load(EventReader)Loads data.
Remove(YamlElement)Removes an item.
Remove(string)Removes an item.
RemoveAt(int)Removes at.
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<Meziantou.Framework.Yaml.Model.YamlElement,Meziantou.Framework.Yaml.Model.YamlElement>>.Add(KeyValuePair<YamlElement, YamlElement?>)
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<Meziantou.Framework.Yaml.Model.YamlElement,Meziantou.Framework.Yaml.Model.YamlElement>>.Contains(KeyValuePair<YamlElement, YamlElement?>)
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<Meziantou.Framework.Yaml.Model.YamlElement,Meziantou.Framework.Yaml.Model.YamlElement>>.CopyTo(KeyValuePair<YamlElement, YamlElement?>[], int)
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<Meziantou.Framework.Yaml.Model.YamlElement,Meziantou.Framework.Yaml.Model.YamlElement>>.Remove(KeyValuePair<YamlElement, YamlElement?>)
System.Collections.IEnumerable.GetEnumerator()
TryGetValue(YamlElement, YamlElement)Tries to get Value.
TryGetValue(string, YamlElement)Tries to get Value.

Add(YamlElement, YamlElement?)

YamlMapping.cs

Adds an item.

public void Add(YamlElement key, YamlElement? value)

Parameters

key YamlElement
value YamlElement?

Removes all elements from the collection.

public void Clear()

ContainsKey overloads

ContainsKey(YamlElement)

YamlMapping.cs

Determines whether key.

public bool ContainsKey(YamlElement key)
Parameters
key YamlElement
Returns

bool

ContainsKey(string)

YamlMapping.cs

Determines whether key.

public bool ContainsKey(string key)
Parameters
key string
Returns

bool

DeepClone()

YamlMapping.cs

Creates a deep clone of the current value.

public override YamlNode DeepClone()

Returns

YamlNode

GetEnumerator()

YamlMapping.cs

IndexOf(KeyValuePair<YamlElement, YamlElement?>)

YamlMapping.cs

Gets the zero-based index of the specified item.

public int IndexOf(KeyValuePair<YamlElement, YamlElement?> item)

Insert(int, KeyValuePair<YamlElement, YamlElement?>)

YamlMapping.cs

Inserts an item at the specified index.

public void Insert(int index, KeyValuePair<YamlElement, YamlElement?> item)

Load(EventReader)

YamlMapping.cs

Loads data.

public static YamlMapping Load(EventReader eventReader)

Parameters

eventReader EventReader

Returns

YamlMapping

Remove overloads

Remove(YamlElement)

YamlMapping.cs

Removes an item.

public bool Remove(YamlElement key)
Parameters
key YamlElement
Returns

bool

Remove(string)

YamlMapping.cs

Removes an item.

public bool Remove(string key)
Parameters
key string
Returns

bool

RemoveAt(int)

YamlMapping.cs

Removes at.

public void RemoveAt(int index)

Parameters

index int

System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<Meziantou.Framework.Yaml.Model.YamlElement,Meziantou.Framework.Yaml.Model.YamlElement>>.Add(KeyValuePair<YamlElement, YamlElement?>)

YamlMapping.cs

System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<Meziantou.Framework.Yaml.Model.YamlElement,Meziantou.Framework.Yaml.Model.YamlElement>>.Contains(KeyValuePair<YamlElement, YamlElement?>)

YamlMapping.cs

System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<Meziantou.Framework.Yaml.Model.YamlElement,Meziantou.Framework.Yaml.Model.YamlElement>>.CopyTo(KeyValuePair<YamlElement, YamlElement?>[], int)

YamlMapping.cs

Parameters

array KeyValuePair<YamlElement, YamlElement?>[]
arrayIndex int

No documentation is available.

System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<Meziantou.Framework.Yaml.Model.YamlElement,Meziantou.Framework.Yaml.Model.YamlElement>>.Remove(KeyValuePair<YamlElement, YamlElement?>)

YamlMapping.cs

System.Collections.IEnumerable.GetEnumerator()

YamlMapping.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.

TryGetValue overloads

TryGetValue(YamlElement, YamlElement)

YamlMapping.cs

Tries to get Value.

public bool TryGetValue(YamlElement key, out YamlElement value)
Parameters
key YamlElement
value YamlElement
Returns

bool

TryGetValue(string, YamlElement)

YamlMapping.cs

Tries to get Value.

public bool TryGetValue(string key, out YamlElement value)
Parameters
key string
value YamlElement
Returns

bool