Table of Contents

Class CountBreakdownCollection

Namespace
CENTREL.XIA.Configuration.Types
Assembly
CENTREL.XIA.Configuration.Types.dll

Provides a count of individual items by name.

public class CountBreakdownCollection : Collection<CountBreakdownItem>, IList<CountBreakdownItem>, ICollection<CountBreakdownItem>, IList, ICollection, IReadOnlyList<CountBreakdownItem>, IReadOnlyCollection<CountBreakdownItem>, IEnumerable<CountBreakdownItem>, IEnumerable
Inheritance
CountBreakdownCollection
Implements
Inherited Members

Constructors

CountBreakdownCollection()

Initializes a new instance of the CENTREL.XIA.Configuration.Types.CountBreakdownCollection class.

public CountBreakdownCollection()

Properties

this[string]

Returns the in the collection with the specified name.

public CountBreakdownItem this[string name] { get; }

Parameters

name string

The name of the item to locate.

Property Value

CountBreakdownItem

The item with the specified name, or null if no item with that name is found.

MaxValue

Gets the maximum count value in the collection.

[Browsable(false)]
public int MaxValue { get; }

Property Value

int

Methods

Add(string)

Adds and increments the value of the specified name.

public void Add(string name)

Parameters

name string

Add(string, int)

Adds and increments the value of the specified name by the specified amount.

public void Add(string name, int count)

Parameters

name string

The name of the item to add.

count int

The count of the item to add.

Exists(string)

Determines whether an item exists in the collection with the specified name.

public bool Exists(string name)

Parameters

name string

The name of the item to locate.

Returns

bool

A System.Boolean value that indicates whether an item with the specified name exists in the collection.

FindByName(string)

Returns the in the collection with the specified name.

public CountBreakdownItem FindByName(string name)

Parameters

name string

The name of the item to locate.

Returns

CountBreakdownItem

The item with the specified name, or null if no item with that name is found.

InsertItem(int, CountBreakdownItem)

Overrides the insertion of new items, if an item with the specified name exists within the collection the count is automatically incremented.

protected override void InsertItem(int index, CountBreakdownItem item)

Parameters

index int

The index at which the item should be inserted.

item CountBreakdownItem

The item to be inserted.

Parse(string)

Parses the specified names using Environment.Newline as a delimiter and adds them to the collection.

public void Parse(string names)

Parameters

names string

The names to add to the collection.

Parse(string, string)

Parses the specified names and adds them to the collection.

public void Parse(string names, string delimiter)

Parameters

names string

The names to add to the collection.

delimiter string

The delimiter to use.

Sort()

Sorts the values in the collection by name.

public void Sort()