SmallComponentInfoSet Class

Implementation of IComponentInfoSet which is based on unsorted ListT.

  Note

Performance of Add(IComponentInfo) method implemented here is O(N). This implementation should be used in scenarios where the number of items is small (1-5) so it is better to optimize memory usage rather than performance.

Definition

Namespace: SMath.Extensibility.Collections
Assembly: SMath.Manager (in SMath.Manager.dll) Version: 1.74.9654.0
C#
public class SmallComponentInfoSet : IComponentInfoSet, 
	IEnumerable<IComponentInfo>, IEnumerable
Inheritance
Object    SmallComponentInfoSet
Implements
IComponentInfoSet, IEnumerableIComponentInfo, IEnumerable

Constructors

SmallComponentInfoSet Constructs an empty set.

Methods

Add Adds an item to the set. If an item with the specified PublicGuid already exists then Version is checked: when Version of the existing item is newer or equal then no change is made, otherwise the existing item is replaced.
AddRange Repeats Add(IComponentInfo) for all specified items.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetEnumeratorReturns an enumerator that iterates through the collection.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ReplaceContents

Replaces all items in this set with items of the specified set.

  Note

Using IComponentInfoSet as type of source argument guarantees that items being added are unique.

ToStringReturns a string that represents the current object.
(Inherited from Object)

Explicit Interface Implementations

IEnumerableGetEnumeratorReturns an enumerator that iterates through a collection.

See Also