Ejemplo n.º 1
0
        /// <summary>
        /// Returns a clone of this object.
        /// </summary>
        /// <returns></returns>
        public object Clone()
        {
            RouteTags clone = new RouteTags();

            clone.Key   = this.Key;
            clone.Value = this.Value;
            return(clone);
        }
Ejemplo n.º 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)
        {
            List <RouteTags> tags_list = new List <RouteTags>();

            foreach (KeyValuePair <string, string> pair in tags)
            {
                RouteTags tag = new RouteTags();
                tag.Key   = pair.Key;
                tag.Value = pair.Value;
                tags_list.Add(tag);
            }
            return(tags_list.ToArray());
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Converts a dictionary of tags to a RouteTags array.
        /// </summary>
        /// <param name="tags"></param>
        /// <returns></returns>
        public static RouteTags[] ConvertFrom(this TagsCollection 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());
        }
Ejemplo n.º 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)
        {
            List <RouteTags> tags_list = new List <RouteTags>();

            if (tags != null)
            {
                foreach (KeyValuePair <string, string> pair in tags)
                {
                    RouteTags tag = new RouteTags();
                    tag.Key   = pair.Key;
                    tag.Value = pair.Value;
                    tags_list.Add(tag);
                }
            }
            return(tags_list.ToArray());
        }
Ejemplo n.º 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)
 {
     List<RouteTags> tags_list = new List<RouteTags>();
     if (tags != null)
     {
         foreach (KeyValuePair<string, string> pair in tags)
         {
             RouteTags tag = new RouteTags();
             tag.Key = pair.Key;
             tag.Value = pair.Value;
             tags_list.Add(tag);
         }
     }
     return tags_list.ToArray();
 }
Ejemplo n.º 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)
 {
     List<RouteTags> tags_list = new List<RouteTags>();
     foreach (KeyValuePair<string, string> pair in tags)
     {
         RouteTags tag = new RouteTags();
         tag.Key = pair.Key;
         tag.Value = pair.Value;
         tags_list.Add(tag);
     }
     return tags_list.ToArray();
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Returns a clone of this object.
 /// </summary>
 /// <returns></returns>
 public object Clone()
 {
     RouteTags clone = new RouteTags();
     clone.Key = this.Key;
     clone.Value = this.Value;
     return clone;
 }