/// <summary> /// Determines whether given input field is allowed /// </summary> /// <param name="inputFieldName">Name of the input field</param> public bool IsAllowedInputField(string inputFieldName) { if (AllowedInputFieldsCfg != null) { return(AllowedInputFieldsCfg.IsAllowed(inputFieldName)); } return(false); }
/// <summary> /// Generates xml element containing the settings. /// </summary> /// <param name="rootElemName">Name to be used as a name of the root element.</param> /// <param name="suppressDefaults">Specifies whether to ommit optional nodes having set default values</param> /// <returns>XElement containing the settings</returns> public override XElement GetXml(string rootElemName, bool suppressDefaults) { XElement rootElem = new XElement(rootElemName, new XAttribute("readoutUnitName", ReadoutUnitName) ); if (AllowedPredictorsCfg != null && (!suppressDefaults || !AllowedPredictorsCfg.ContainsOnlyDefaults)) { rootElem.Add(AllowedPredictorsCfg.GetXml(suppressDefaults)); } if (AllowedPoolsCfg != null && (!suppressDefaults || !AllowedPoolsCfg.ContainsOnlyDefaults)) { rootElem.Add(AllowedPoolsCfg.GetXml(suppressDefaults)); } if (AllowedInputFieldsCfg != null && (!suppressDefaults || !AllowedInputFieldsCfg.ContainsOnlyDefaults)) { rootElem.Add(AllowedInputFieldsCfg.GetXml(suppressDefaults)); } Validate(rootElem, XsdTypeName); return(rootElem); }