public CompressionConditionManager(CompressionConditionConfigs configs)
        {
            if (configs == null)
            {
                throw new ArgumentNullException("config");
            }
            if (configs.Items == null)
            {
                throw new ArgumentNullException("config.Items");
            }

            AddRange(configs.Items);
        }
        public static CompressionConditionManager LoadFromFile(string path)
        {
            CompressionConditionManager manager = new CompressionConditionManager();

            try
            {
                XmlSerializer serializer = new XmlSerializer(typeof(CompressionConditionConfigs), "TimeSeries");
                using (TextReader reader = new StreamReader(path))
                {
                    CompressionConditionConfigs configs = (CompressionConditionConfigs)serializer.Deserialize(reader);
                    if (configs.Items != null)
                    {
                        manager.AddRange(configs.Items);
                    }
                }
            }
            catch (Exception ex)
            {
                _logger.Error(string.Format("LoadFromFile: {0}", path), ex);
            }
            return(manager);
        }