SerializationItemCollection
A collection of SerializationItem instances with name-based lookup.
继承自: BaseList<SerializationItem>
实现: ICloneable<SerializationItemCollection>, ICloneable
构造函数
public SerializationItemCollection()
serializationItemCollection = SerializationItemCollection()
Initializes an empty collection.
public SerializationItemCollection(IEnumerable<SerializationItem> source)
serializationItemCollection = SerializationItemCollection(source)
Initializes a new collection populated from the specified source.
属性
public SerializationItem Item { get; }
value = serializationItemCollection.Item
Gets the item with the specified name.
方法
public SerializationItemCollection Clone()
result = serializationItemCollection.Clone()
Creates a deep copy of this collection.
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.
返回值: true if the specified object is equal to the current object; otherwise, false.
public override int GetHashCode()
result = serializationItemCollection.GetHashCode()
Computes a hash code for this tuple based on its values.
返回值: A hash code for the tuple.
protected override bool OnAdding(SerializationItem item)
result = serializationItemCollection.OnAdding(item)
protected override bool OnClearing()
result = serializationItemCollection.OnClearing()
Invokes the Clearing event before clearing the collection.
返回值: True if the clearing should proceed; otherwise, false.
protected override bool OnInserting(int index, SerializationItem item)
result = serializationItemCollection.OnInserting(index, item)
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.
protected override bool OnRemoving(SerializationItem item)
result = serializationItemCollection.OnRemoving(item)
public bool Remove(string name)
result = serializationItemCollection.Remove(name)
Removes the item with the specified name.
public bool TryGetItem(string name, SerializationItem item)
result = serializationItemCollection.TryGetItem(name, item)
Tries to get an item by name, returning false if not found.