Esempio n. 1
0
 /// <summary>
 /// Adds a tag or replace the existing value if any.
 /// </summary>
 /// <param name="tag"></param>
 public override void AddOrReplace(Tag tag)
 {
 }
        /// <summary>
        /// Converts the given tagscollection from a tags list.
        /// </summary>
        /// <param name="tags"></param>
        /// <returns></returns>
        public static TagsCollection ConvertFrom(List<RedisTag> tags)
        {
            TagsCollection redisTags = null;
            if (tags != null)
            {
                redisTags = new SimpleTagsCollection();
                if (tags != null)
                {
                    foreach (RedisTag redisTag in tags)
                    {
                        Tag tag = new Tag();
                        tag.Key = redisTag.Key;
                        tag.Value = redisTag.Value;

                        redisTags.Add(tag);
                    }
                }
            }
            return redisTags;
        }
Esempio n. 3
0
 /// <summary>
 /// Adds a tag.
 /// </summary>
 /// <param name="tag"></param>
 public override void Add(Tag tag)
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Adds a new tag to this collection.
 /// </summary>
 /// <param name="tag"></param>
 public override void AddOrReplace(Tag tag)
 {
     this.AddOrReplace(tag.Key, tag.Value);
 }
Esempio n. 5
0
 /// <summary>
 /// Adds a new tag to this collection.
 /// </summary>
 /// <param name="tag"></param>
 public override void Add(Tag tag)
 {
     _tags.Add(_tagsTable.Add(tag));
 }
Esempio n. 6
0
 /// <summary>
 /// Adds a new tag to this collection.
 /// </summary>
 /// <param name="tag"></param>
 public override void Add(Tag tag)
 {
     _tags.Add(tag);
 }
 /// <summary>
 /// Adds a tag.
 /// </summary>
 /// <param name="tag"></param>
 public override void Add(Tag tag)
 {
     this.Add(tag.Key, tag.Value);
 }
 /// <summary>
 /// Returns an enumerator for the tags.
 /// </summary>
 /// <returns></returns>
 public override IEnumerator<Tag> GetEnumerator()
 {
     foreach (var tagEncoded in _tagsList)
     {
         var tag = new Tag()
                       {
                           Key = _stringTable.Get(tagEncoded.Key),
                           Value = _stringTable.Get(tagEncoded.Value)
                       };
         yield return tag;
     }
 }