示例#1
0
        /// <summary>
        /// Get a NamedDataSet containing the keys and value ranges of all datasets
        /// in this collection
        /// </summary>
        /// <returns></returns>
        public NamedDataSet GetEndValueRanges()
        {
            NamedDataSet result = new NamedDataSet();

            foreach (var dataSet in this)
            {
                foreach (string key in dataSet.Data.Keys)
                {
                    if (!result.Data.ContainsKey(key))
                    {
                        result.Data.Add(key, new Interval(dataSet.Data[key].End));
                    }
                    else
                    {
                        result.Data[key] = result.Data[key].Include(dataSet.Data[key].End);
                    }
                }
            }

            return(result);
        }
示例#2
0
        /// <summary>
        /// Get a NamedDataSet containing the keys and value ranges of all datasets
        /// in this collection
        /// </summary>
        /// <returns></returns>
        public NamedDataSet GetValueRanges()
        {
            NamedDataSet result = new NamedDataSet();

            foreach (var dataSet in this)
            {
                foreach (string key in dataSet.Data.Keys)
                {
                    if (!result.Data.ContainsKey(key))
                    {
                        result.Data.Add(key, dataSet.Data[key]);
                    }
                    else
                    {
                        result.Data[key] = result.Data[key].Union(dataSet.Data[key]);
                    }
                }
            }

            return(result);
        }