public DropFilterConfiguration(XElement config, ConfigurationFactory configurationFactory)
        {
            Conditions = configurationFactory.CreateConditionsConfiguration(config);
            Actions    = configurationFactory.CreateActionsConfiguration(config);

            if (string.IsNullOrWhiteSpace(Conditions.Expression))
            {
                throw new ConfigurationException("Invalid 'Expression' in " + config);
            }
        }
Esempio n. 2
0
        public ExtractTimestampFilterConfiguration(XElement config, ConfigurationFactory configurationFactory)
        {
            var adjustToLocal = (bool?)config.Attribute("AdjustToLocal") ?? false;

            if (!adjustToLocal)
            {
                DateTimeStyles |= DateTimeStyles.AdjustToUniversal;
            }

            var assumeLocal = (bool?)config.Attribute("AssumeLocal") ?? false;

            if (assumeLocal)
            {
                DateTimeStyles |= DateTimeStyles.AssumeLocal;
            }
            else
            {
                DateTimeStyles |= DateTimeStyles.AssumeUniversal;
            }

            Conditions = configurationFactory.CreateConditionsConfiguration(config);
            Actions    = configurationFactory.CreateActionsConfiguration(config);
        }
Esempio n. 3
0
 public MatchFilterConfiguration(XElement config, ConfigurationFactory configurationFactory)
 {
     Conditions = configurationFactory.CreateConditionsConfiguration(config);
     Actions    = configurationFactory.CreateActionsConfiguration(config);
 }