Show / Hide Table of Contents

Interface IManagerItemCollection<TItem>

Collection of the manager items.

Inherited Members
System.Collections.IEnumerable.GetEnumerator()
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 name. If element with the name name not found, the default value for the current element type will be returned.

Exceptions
Type Condition
ArgumentNullOrEmptyException

Rises if the value of the name argument is empty or is null.

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 uid. If element with the uid unique identifier not found, the default value for the current element type will be returned.

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 name name. If a manager item with the name name is not found, an exception is thrown.

Exceptions
Type Condition
ItemNotFoundException

If the manager item with the name name is not found.

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 uid identifier. If an item with the uid unique identifier is not found, an exception is thrown.

Exceptions
Type Condition
ItemNotFoundException

If a manager item with the uid unique identifier is not found.

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 match criteria.

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.

Extension Methods

CollectionUtilities.IsNotEmpty(IEnumerable)
CollectionUtilities.IsEmpty(IEnumerable)
CollectionUtilities.IsNullOrEmpty(IEnumerable)
CollectionUtilities.IsNotNullOrEmpty(IEnumerable)
ReflectionUtilities.GetPropertyValue(Object, String)
ReflectionUtilities.GetPropertyDefValue(Object, String, Object)
ReflectionUtilities.TryGetPropertyValue(Object, String, out Object)
ReflectionUtilities.HasProperty(Object, String)
ReflectionUtilities.GetPropertyValue(Object, String, BindingFlags)
ReflectionUtilities.GetPropertyValueByPath(Object, String)
ReflectionUtilities.SetPropertyValue(Object, String, Object)
ReflectionUtilities.TrySetPropertyValue(Object, String, Object)
ValidateUtilities.CheckArgumentNull(Object, String)
ValidateUtilities.CheckDependencyNull(Object, String)
ValidateUtilities.EnsureDependencyNotNull<T>(T, String)
MetaDataTestUtils.MetaPropertiesShouldNotHaveDefValue<TInstance>(TInstance)
MetaDataTestUtils.MetaPropertiesShouldNotHaveDefValue<TInstance>(TInstance, Boolean)
NSubstituteExtension.Protected(Object, String, Object[])
NSubstituteExtension.Protected(Object, String, Boolean, Object[])
NSubstituteExtension.ProtectedGeneric<T>(Object, String, Object[])
NSubstituteExtension.ProtectedGeneric<T>(Object, String, Boolean, Object[])
NSubstituteExtension.ProtectedProperty(Object, String)
NSubstituteExtension.MatchInstance<T>(T)
SubstituteUtilities.GetIsSubstituteObject(Object)
SubstituteUtilities.Instead<TInstance, TValue>(TInstance, Func<TInstance, TValue>)
Back to top Generated by DocFX