Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="keyIndex"></param>
        /// <param name="indexedKeyColumns"></param>
        /// <param name="serieValues"></param>
        /// <returns></returns>
        protected virtual SerieSetItem GetSerieSetItem(int keyIndex, Dictionary <string, int> indexedKeyColumns, IList <object> serieValues)
        {
            var serieSetItemTags = new Dictionary <string, string>();

            foreach (var tag in indexedKeyColumns)
            {
                if (tag.Key != KeyColumnName)
                {
                    serieSetItemTags.Add(tag.Key, ( string )serieValues [tag.Value]);
                }
            }

            var serieSetItem = new SerieSetItem()
            {
                Key  = ( string )serieValues [keyIndex],
                Tags = serieSetItemTags
            };

            return(serieSetItem);
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="serieSets"></param>
        /// <param name="serieSetItem"></param>
        protected virtual void BindSerieSets(List <SerieSet> serieSets, SerieSetItem serieSetItem)
        {
            var serieKeyValues = serieSetItem.Key.Split(',');
            var serieName      = serieKeyValues.FirstOrDefault();

            if (!String.IsNullOrEmpty(serieName) && !serieSets.Any(p => p.Name == serieName))
            {
                var serieSet = new SerieSet()
                {
                    Name = serieName
                };
                serieSet.Series.Add(serieSetItem);
                serieSets.Add(serieSet);
            }
            else
            {
                var serieSet = serieSets.FirstOrDefault(p => p.Name == serieName);
                serieSet.Series.Add(serieSetItem);
            }
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="serieSets"></param>
 /// <param name="serieSetItem"></param>
 protected override void BindSerieSets(List <SerieSet> serieSets, SerieSetItem serieSetItem)
 {
     throw new InvalidOperationException("Method not applicable to this version of InfluxDB");
 }