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