Base for name-keyed collections that support enumeration and automatic conflict-free name generation.
Definition
Namespace:Telerik.Windows.Documents.Fixed.Model.Collections
Assembly:Telerik.Windows.Documents.Fixed.dll
Type Parameters:
T
Syntax:
public abstract class NamedCollectionBase<T> : IEnumerable<T>, IEnumerable
Inheritance: objectNamedCollectionBase<T>
Derived Classes:
Implements:
Constructors
Initializes a new instance of the NamedCollectionBase<T> class. Provides a thread-safe base for managing name-keyed collections with automatic name conflict resolution.
protected NamedCollectionBase()
Methods
Return an enumerator that iterates through the collection of named objects.
public abstract IEnumerator<T> GetEnumerator()
IEnumerator<T>
An enumerator for the collection.
Implements:
Creates an incremented name by appending a numeric suffix to avoid naming conflicts.
protected string IncrementFileName(ref int counter, string[] splitName, string fileName)
The current counter value used for generating unique suffixes.
splitNamestring[]The name components split by dot separators.
fileNamestringThe base file name without extension or numeric suffix.
Returns:A new unique name with an incremented numeric suffix.
Generates an incremented version of the provided name if it already exists in the collection.
protected abstract string IncrementFileNameOverride(ref int counter, string[] splitName, string fileName, string newName)
The current counter value used for generating unique suffixes.
splitNamestring[]The name components split by dot separators.
fileNamestringThe base file name without extension or numeric suffix.
newNamestringThe candidate new name to check for uniqueness.
Returns:A unique name that doesn't conflict with existing names in the collection.
Validates that the collection has not exceeded its maximum capacity limit.
protected abstract void VerifyCollectionLimit()