Click or drag to resize

ExtensionsGetEquipmentTree Method (IPhysicalEntity, CapabilityEnum, ListIEquipment)

Customize MACE to meet your Live-Virtual-Constructive Simulation and Training Requirements.

[This is preliminary documentation and is subject to change.]

Extension method that recursively searchs the entity and entire comm linked tree for a specific type and gets or add to a list of that type.

Namespace:  BSI.MACE
Assembly:  BSILib (in BSILib.dll) Version: 1.2.1.22047 (1.0.0.0)
Syntax
public static List<IEquipment> GetEquipmentTree(
	this IPhysicalEntity thisEntity,
	CapabilityEnum capability,
	List<IEquipment> equipmentList = null
)

Parameters

thisEntity
Type: BSI.MACEIPhysicalEntity
The entity and subordinate entities to search.
capability
Type: BSI.MACECapabilityEnum
Flag(s) to search for. If mutiple flags are specified ANY matching flag will return the equipment.
equipmentList (Optional)
Type: System.Collections.GenericListIEquipment
Optional list to add to. If no list is passed in then one is created.

Return Value

Type: ListIEquipment
A list containing equipment with the specified capabilities.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IPhysicalEntity. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
Usage: Dim list as List(Of IEquipment) = MyEntity.GetEquipmentList(CapabilityEnum.Radio) OR MyEntity.GetEquipmentList(CapabilityEnum.Radio, MyExistingList)
See Also