Method GetHostObjects
GetHostObjects<T>()
Retrieves all host objects of the specified type from the collection.
public virtual IEnumerable<T> GetHostObjects<T>() where T : class
Returns
- IEnumerable<T>
An enumerable collection of objects of type
T. The collection will be empty if no objects of the specified type are found.
Type Parameters
TThe type of host objects to retrieve. Must be a reference type.
Remarks
This method filters the HostObjects collection and returns
only those objects
that can be cast to the specified type T.
If the HostObjects collection is
null, the method returns an empty enumerable.