Class
NamedCollectionBase<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:

cs-api-definition
public abstract class NamedCollectionBase<T> : IEnumerable

Inheritance: objectNamedCollectionBase<T>

Derived Classes: EmbeddedFilesCollection

Implements: IEnumerable

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

cs-api-definition
protected NamedCollectionBase()

Methods

GetEnumerator()

Return an enumerator that iterates through the collection of named objects.

Declaration

cs-api-definition
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

cs-api-definition
protected string IncrementFileName(ref int counter, string[] splitName, string fileName)

Parameters

counter

int

The current counter value used for generating unique suffixes.

splitName

string[]

The name components split by dot separators.

fileName

string

The base file name without extension or numeric suffix.

Returns

string

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

cs-api-definition
protected abstract string IncrementFileNameOverride(ref int counter, string[] splitName, string fileName, string newName)

Parameters

counter

int

The current counter value used for generating unique suffixes.

splitName

string[]

The name components split by dot separators.

fileName

string

The base file name without extension or numeric suffix.

newName

string

The candidate new name to check for uniqueness.

Returns

string

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

cs-api-definition
protected abstract void VerifyCollectionLimit()