示例#1
0
        /// <summary>
        /// Creates a new <see cref="MultiFilter"/> from configuration using the group name in configuration
        /// </summary>
        /// <param name="groupName">The name of the group in configuration</param>
        public MultiFilter(string groupName)
        {
            if (string.IsNullOrEmpty(groupName))
            {
                throw new ArgumentNullException("groupName");
            }

            UkadcDiagnosticsSection multiFilterSection       = UkadcDiagnosticsSection.ReadConfigSection();
            FilterGroupElement      filterGroupConfigElement = multiFilterSection.FilterGroups[groupName];

            if (null == filterGroupConfigElement)
            {
                throw new ConfigurationErrorsException(
                          string.Format(CultureInfo.CurrentCulture, Resources.MultiFilterGroupError, groupName));
            }

            _filterGroup = new MultiFilterGroup(filterGroupConfigElement);
            Validate();
        }
示例#2
0
 /// <summary>
 /// Creates a new <see cref="MultiFilter"/> with a specified <see cref="MultiFilterGroup"/>
 /// </summary>
 /// <param name="filterGroup"></param>
 public MultiFilter(MultiFilterGroup filterGroup)
 {
     _filterGroup = filterGroup;
     Validate();
 }