Beispiel #1
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance
 /// </summary>
 /// <param name="readoutUnitName">Name of the readout unit</param>
 /// <param name="allowedPredictorsCfg">Allowed predictors</param>
 /// <param name="allowedPoolsCfg">Allowed pools</param>
 /// <param name="allowedInputFieldsCfg">Allowed input fields</param>
 public ReadoutUnitMapSettings(string readoutUnitName,
                               AllowedPredictorsSettings allowedPredictorsCfg,
                               AllowedPoolsSettings allowedPoolsCfg,
                               AllowedInputFieldsSettings allowedInputFieldsCfg)
 {
     ReadoutUnitName       = readoutUnitName;
     AllowedPredictorsCfg  = allowedPredictorsCfg == null ? null : (AllowedPredictorsSettings)allowedPredictorsCfg.DeepClone();
     AllowedPoolsCfg       = allowedPoolsCfg == null ? null : (AllowedPoolsSettings)allowedPoolsCfg.DeepClone();
     AllowedInputFieldsCfg = allowedInputFieldsCfg == null ? null : (AllowedInputFieldsSettings)allowedInputFieldsCfg.DeepClone();
     Check();
     return;
 }
Beispiel #2
0
        /// <summary>
        /// Creates an initialized instance.
        /// </summary>
        /// <param name="elem">Xml element containing the initialization settings</param>
        public ReadoutUnitMapSettings(XElement elem)
        {
            //Validation
            XElement settingsElem = Validate(elem, XsdTypeName);

            //Parsing
            ReadoutUnitName = settingsElem.Attribute("readoutUnitName").Value;
            XElement allowedPredictorsElem = settingsElem.Elements("allowedPredictors").FirstOrDefault();

            AllowedPredictorsCfg = allowedPredictorsElem == null ? null : new AllowedPredictorsSettings(allowedPredictorsElem);
            XElement allowedPoolsElem = settingsElem.Elements("allowedPools").FirstOrDefault();

            AllowedPoolsCfg = allowedPoolsElem == null ? null : new AllowedPoolsSettings(allowedPoolsElem);
            XElement allowedInputFieldsElem = settingsElem.Elements("allowedInputFields").FirstOrDefault();

            AllowedInputFieldsCfg = allowedInputFieldsElem == null ? null : new AllowedInputFieldsSettings(allowedInputFieldsElem);
            Check();
            return;
        }
Beispiel #3
0
 /// <summary>
 /// The deep copy constructor
 /// </summary>
 /// <param name="source">The source instance.</param>
 public AllowedInputFieldsSettings(AllowedInputFieldsSettings source)
     : this()
 {
     AddAllowedInputFields(source.AllowedInputFieldCfgCollection);
     return;
 }