Method FindItemsByTag
FindItemsByTag(Tag, ICollection<TItem>)
Fills in the given target
collection with all
TItem
instances of this catalog matching the
given tag
and returns their count.
The target
collection is cleared before being
populated.
Declaration
public int FindItemsByTag(Tag tag, ICollection<TItem> target = null)
Parameters
Type | Name | Description |
---|---|---|
Tag | tag | The Tag instance used as a filter |
ICollection<TItem> | target | The target container of all the matching
|
Returns
Type | Description |
---|---|
int | The number of |
Exceptions
Type | Condition |
---|---|
Argument |
If the
|
FindItemsByTag(string, ICollection<TItem>)
Fills in the given target
collection with all
TItem
instances of this catalog matching the
Tag by its key
and returns
their count.
The target
collection is cleared before being
populated.
Declaration
public int FindItemsByTag(string key, ICollection<TItem> target = null)
Parameters
Type | Name | Description |
---|---|---|
string | key | The identifier of the Tag used as a filter |
ICollection<TItem> | target | The target container of all the matching
|
Returns
Type | Description |
---|---|
int | The number of |
Exceptions
Type | Condition |
---|---|
Argument |
If the
|
Argument |
If there is no
Tag instance with the given
|
FindItemsByTag(Tag)
Returns the array of all the TItem
instances
of this catalog matching the given Tag.
Declaration
public TItem[] FindItemsByTag(Tag tag)
Parameters
Returns
Type | Description |
---|---|
TItem[] | The array of all the |
Remarks
Keep in mind that this method allocates an array.
If you want to avoid allocations, please consider using
Find
Exceptions
Type | Condition |
---|---|
Argument |
If the
|
FindItemsByTag(string)
Returns an array of all the TItem
instances
of this catalog matching the Tag by its
key
.
Declaration
public TItem[] FindItemsByTag(string key)
Parameters
Returns
Type | Description |
---|---|
TItem[] | The array of all the |
Remarks
Keep in mind that this method allocates an array.
If you want to avoid allocations, please consider using
Find
Exceptions
Type | Condition |
---|---|
Argument |
If the
|
Argument |
If there is no
Tag instance with the given
|