From 36683c7402f8a53648beb2b1aa546c2b9fd26b74 Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Sun, 20 Apr 2014 12:36:20 +0200 Subject: [PATCH] add tags as string --- PocketSharp/Models/PocketItem.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/PocketSharp/Models/PocketItem.cs b/PocketSharp/Models/PocketItem.cs index 76236a3..311b9a0 100644 --- a/PocketSharp/Models/PocketItem.cs +++ b/PocketSharp/Models/PocketItem.cs @@ -3,6 +3,7 @@ using PropertyChanged; using System; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; namespace PocketSharp.Models { @@ -301,6 +302,17 @@ namespace PocketSharp.Models [JsonProperty("time_favorited")] public DateTime? FavoriteTime { get; set; } + /// + /// Gets or sets the tags as comma-separated strings. + /// + /// + /// The tags. + /// + [JsonIgnore] + public string TagsString + { + get { return Tags != null ? String.Join(",", Tags.Select(tag => tag.Name)) : ""; } + } /// /// Gets or sets the tags.