Class CompositeModule
Represents a base module for a module that can contain child modules. You can build trees of CompositeModule instances.
public class CompositeModule : LisrtModule, INotifyPropertyChangedEx, ICompositeModule, ILisrtModule, INotifyPropertyChanged
- Inheritance
-
PropertyChangedBaseCompositeModule
- Implements
-
INotifyPropertyChangedEx
- Derived
- Inherited Members
-
PropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.PropertyChanged
- Extension Methods
Examples
This example creates a station with two work positions ("Flashing" and "FunctionTest").
_root = new LisrtModule("Station", new LisrtModule[]
{
new LisrtModule("WpFlash", new LisrtModule[]
{
new LisrtModule("PowerSupply"),
new LisrtModule("Programmer")
}),
new LisrtModule("WpFunctionTest", new LisrtModule[]
{
new PowerSupplyModule("PowerSupply", new SerialPort()),
new LisrtModule("Multiplexer"),
new LisrtModule("DMM")
})
});
Constructors
CompositeModule(string)
Initializes a new instance of the CompositeModule class.
public CompositeModule(string name)
Parameters
name
stringThe name of the CompositeModule instance.
Exceptions
- ArgumentNullException
Thrown when
name
is null or empty.
CompositeModule(string, params ILisrtModule[])
Initializes a new instance of the CompositeModule class.
public CompositeModule(string name, params ILisrtModule[] subModules)
Parameters
name
stringThe name of the CompositeModule instance.
subModules
ILisrtModule[]Sub modules of the new ILisrtModule instance.
Properties
SubModules
Gets a collection of the child instances of LisrtModule.
public virtual ILisrtModuleCollection SubModules { get; }