Interface IManagerItemCollection<TItem>
Collection of the manager items.
Inherited Members
Namespace: Terrasoft.Core
Assembly: Terrasoft.Core.dll
Syntax
public interface IManagerItemCollection<TItem> : IEnumerable
Type Parameters
Name | Description |
---|---|
TItem | Any type. |
Properties
ItemCount
Number of items in the collection.
Declaration
int ItemCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Clear()
Removes all items of the manager.
Declaration
void Clear()
FindByName(String)
Searches collection element of the current type by given name.
Declaration
TItem FindByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the collection element. |
Returns
Type | Description |
---|---|
TItem | Collection element of the current type with name |
Exceptions
Type | Condition |
---|---|
ArgumentNullOrEmptyException | Rises if the value of the |
FindByUId(Guid)
Searches collection element of the current type by given identifier.
Declaration
TItem FindByUId(Guid uid)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | uid | Unique identifier of the collection element. |
Returns
Type | Description |
---|---|
TItem | Collection element of the current type with unique identifier |
GetByName(String)
Gets the manager item with the specified name.
Declaration
TItem GetByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The manager item name. |
Returns
Type | Description |
---|---|
TItem | The manager item with the |
Exceptions
Type | Condition |
---|---|
ItemNotFoundException | If the manager item with the |
GetByUId(Guid)
Gets the manager item with the specified unique identifier.
Declaration
TItem GetByUId(Guid uid)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | uid | Unique identifier of the manager item to get. |
Returns
Type | Description |
---|---|
TItem | The manager item with the unique |
Exceptions
Type | Condition |
---|---|
ItemNotFoundException | If a manager item with the |
GetItems()
Gets an enumeration for items of the manager.
Declaration
IEnumerable<TItem> GetItems()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TItem> | The enumeration for items of the manager. |
GetItems(Predicate<TItem>)
Gets an enumeration for the manager items that match the specified criteria.
Declaration
IEnumerable<TItem> GetItems(Predicate<TItem> match)
Parameters
Type | Name | Description |
---|---|---|
System.Predicate<TItem> | match | Criteria that should be matched by the return manager items. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TItem> | The enumeration for items of the manager that match the |
RemoveItemByName(String)
Removes the manager item with the specified name.
Declaration
void RemoveItemByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Identifier of the manager item to remove. |
RemoveItemByUId(Guid)
Removes the manager item with the specified unique identifier.
Declaration
void RemoveItemByUId(Guid uid)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | uid | Unique identifier of the manager item to remove. |