/// <summary> /// Creates an initialized instance /// </summary> /// <param name="readoutUnitsCfgs">Readout layer settings</param> public ReadoutUnitsSettings(params ReadoutUnitSettings[] readoutUnitsCfgs) : this() { foreach (ReadoutUnitSettings rucfg in readoutUnitsCfgs) { ReadoutUnitCfgCollection.Add((ReadoutUnitSettings)rucfg.DeepClone()); } Check(); return; }
/// <summary> /// Creates an initialized instance /// </summary> /// <param name="readoutUnitsCfgs">Collection of readout unit settings</param> public ReadoutUnitsSettings(IEnumerable <ReadoutUnitSettings> readoutUnitsCfgs) : this() { foreach (ReadoutUnitSettings rucfg in readoutUnitsCfgs) { ReadoutUnitCfgCollection.Add((ReadoutUnitSettings)rucfg.DeepClone()); } Check(); return; }
/// <summary> /// Creates an initialized instance. /// </summary> /// <param name="elem">Xml element containing the initialization settings</param> public ReadoutUnitsSettings(XElement elem) : this() { //Validation XElement settingsElem = Validate(elem, XsdTypeName); //Parsing foreach (XElement unitElem in settingsElem.Elements("readoutUnit")) { ReadoutUnitCfgCollection.Add(new ReadoutUnitSettings(unitElem)); } Check(); return; }