示例#1
0
        /// <summary>
        /// Returns a clone of this object.
        /// </summary>
        /// <returns></returns>
        public object Clone()
        {
            var clone = new RouteTags();

            clone.Key   = this.Key;
            clone.Value = this.Value;
            return(clone);
        }
示例#2
0
        /// <summary>
        /// Converts a dictionary of tags to a RouteTags array.
        /// </summary>
        /// <param name="tags"></param>
        /// <returns></returns>
        public static RouteTags[] ConvertFrom(this IDictionary <string, string> tags)
        {
            var tags_list = new List <RouteTags>();

            foreach (var pair in tags)
            {
                RouteTags tag = new RouteTags();
                tag.Key   = pair.Key;
                tag.Value = pair.Value;
                tags_list.Add(tag);
            }
            return(tags_list.ToArray());
        }
示例#3
0
        /// <summary>
        /// Converts a dictionary of tags to a RouteTags array.
        /// </summary>
        /// <param name="tags"></param>
        /// <returns></returns>
        public static RouteTags[] ConvertFrom(this TagsCollectionBase tags)
        {
            var tagsList = new List <RouteTags>();

            foreach (Tag pair in tags)
            {
                var tag = new RouteTags();
                tag.Key   = pair.Key;
                tag.Value = pair.Value;
                tagsList.Add(tag);
            }
            return(tagsList.ToArray());
        }
示例#4
0
        /// <summary>
        /// Converts a list of KeyValuePairs to a RouteTags array.
        /// </summary>
        /// <param name="tags"></param>
        /// <returns></returns>
        public static RouteTags[] ConvertFrom(this List <KeyValuePair <string, string> > tags)
        {
            var tagsList = new List <RouteTags>();

            if (tags != null)
            {
                foreach (var pair in tags)
                {
                    var tag = new RouteTags();
                    tag.Key   = pair.Key;
                    tag.Value = pair.Value;
                    tagsList.Add(tag);
                }
            }
            return(tagsList.ToArray());
        }
示例#5
0
 /// <summary>
 /// Converts a list of KeyValuePairs to a RouteTags array.
 /// </summary>
 /// <param name="tags"></param>
 /// <returns></returns>
 public static RouteTags[] ConvertFrom(this List<KeyValuePair<string, string>> tags)
 {
     var tagsList = new List<RouteTags>();
     if (tags != null)
     {
         foreach (var pair in tags)
         {
             var tag = new RouteTags();
             tag.Key = pair.Key;
             tag.Value = pair.Value;
             tagsList.Add(tag);
         }
     }
     return tagsList.ToArray();
 }
示例#6
0
 /// <summary>
 /// Converts a dictionary of tags to a RouteTags array.
 /// </summary>
 /// <param name="tags"></param>
 /// <returns></returns>
 public static RouteTags[] ConvertFrom(this IDictionary<string, string> tags)
 {
     var tags_list = new List<RouteTags>();
     foreach (var pair in tags)
     {
         RouteTags tag = new RouteTags();
         tag.Key = pair.Key;
         tag.Value = pair.Value;
         tags_list.Add(tag);
     }
     return tags_list.ToArray();
 }
示例#7
0
 /// <summary>
 /// Converts a dictionary of tags to a RouteTags array.
 /// </summary>
 /// <param name="tags"></param>
 /// <returns></returns>
 public static RouteTags[] ConvertFrom(this TagsCollectionBase tags)
 {
     var tagsList = new List<RouteTags>();
     foreach (Tag pair in tags)
     {
         var tag = new RouteTags();
         tag.Key = pair.Key;
         tag.Value = pair.Value;
         tagsList.Add(tag);
     }
     return tagsList.ToArray();
 }
示例#8
0
 /// <summary>
 /// Returns a clone of this object.
 /// </summary>
 /// <returns></returns>
 public object Clone()
 {
     var clone = new RouteTags();
     clone.Key = this.Key;
     clone.Value = this.Value;
     return clone;
 }