SerializationItemCollection

Ecng.Serialization

A collection of SerializationItem instances with name-based lookup.

Herda de: BaseList<SerializationItem>

Implementa: ICloneable<SerializationItemCollection>, ICloneable

Construtores

SerializationItemCollection
public SerializationItemCollection()
serializationItemCollection = SerializationItemCollection()

Initializes an empty collection.

SerializationItemCollection
public SerializationItemCollection(IEnumerable<SerializationItem> source)
serializationItemCollection = SerializationItemCollection(source)

Initializes a new collection populated from the specified source.

Propriedades

Item
public SerializationItem Item { get; }
value = serializationItemCollection.Item

Gets the item with the specified name.

Métodos

Clone
public SerializationItemCollection Clone()
result = serializationItemCollection.Clone()

Creates a deep copy of this collection.

Equals
public override bool Equals(object obj)
result = serializationItemCollection.Equals(obj)

Determines whether the specified object is equal to the current object.

obj
The object to compare with this object.

Retorna: true if the specified object is equal to the current object; otherwise, false.

GetHashCode
public override int GetHashCode()
result = serializationItemCollection.GetHashCode()

Computes a hash code for this tuple based on its values.

Retorna: A hash code for the tuple.

OnAdding
protected override bool OnAdding(SerializationItem item)
result = serializationItemCollection.OnAdding(item)
OnClearing
protected override bool OnClearing()
result = serializationItemCollection.OnClearing()

Invokes the Clearing event before clearing the collection.

Retorna: True if the clearing should proceed; otherwise, false.

OnInserting
protected override bool OnInserting(int index, SerializationItem item)
result = serializationItemCollection.OnInserting(index, item)
OnRemoveAt
protected override void OnRemoveAt(int index)
serializationItemCollection.OnRemoveAt(index)

Removes the item at the specified index from the inner list.

index
The zero-based index of the item to remove.
OnRemoving
protected override bool OnRemoving(SerializationItem item)
result = serializationItemCollection.OnRemoving(item)
Remove
public bool Remove(string name)
result = serializationItemCollection.Remove(name)

Removes the item with the specified name.

TryGetItem
public bool TryGetItem(string name, SerializationItem item)
result = serializationItemCollection.TryGetItem(name, item)

Tries to get an item by name, returning false if not found.