/// <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); }
/// <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()); }
/// <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()); }
/// <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()); }
/// <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(); }
/// <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(); }
/// <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(); }
/// <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; }