コード例 #1
0
        internal bool PolicyConfigurationChanged(TimeSeriesConfiguration other)
        {
            if (IsNullOrEmpty() && other.IsNullOrEmpty())
            {
                return(false);
            }

            if (Collections == null || other.Collections == null)
            {
                return(true);
            }

            if (Collections.Count != other.Collections.Count)
            {
                return(true);
            }

            foreach (var collectionConfiguration in Collections)
            {
                var name = collectionConfiguration.Key;
                var val  = collectionConfiguration.Value;
                if (other.Collections.TryGetValue(name, out var otherCollectionConfiguration) == false)
                {
                    return(true);
                }

                if (Equals(val, otherCollectionConfiguration) == false)
                {
                    return(true);
                }
            }

            if ((PolicyCheckFrequency ?? DefaultPolicyCheckFrequency) != (other.PolicyCheckFrequency ?? DefaultPolicyCheckFrequency))
            {
                return(true);
            }

            return(false);
        }
コード例 #2
0
 public ConfigureTimeSeriesCommand(TimeSeriesConfiguration configuration)
 {
     _configuration = configuration;
 }
コード例 #3
0
 public ConfigureTimeSeriesOperation(TimeSeriesConfiguration configuration)
 {
     _configuration = configuration ?? new TimeSeriesConfiguration();
 }