Beispiel #1
0
        public static void TagResourceForMailItem(String entryID, string resourceName)
        {
            String         json     = TagCommon.Backend.TagsForEmail(entryID);
            TagNames       tagNames = TagCommon.Utils.GetTagNamesForJson(json);
            List <TagName> tags     = tagNames.Tags;

            foreach (TagName tag in tags)
            {
                Backend.TagResource(Utils.RESOURCE_TYPE_FILE, resourceName, tag.Name);
            }
        }
Beispiel #2
0
        public static List <String> GetLatestTagList()
        {
            String         json        = Backend.AllTags();
            TagNames       tagNames    = Utils.GetTagNamesForJson(json);
            List <TagName> tagNameList = tagNames.Tags;
            List <String>  tags        = new List <String>();

            foreach (TagName tag in tagNameList)
            {
                tags.Add(tag.Name);
            }
            tags.Sort();
            return(tags);
        }
Beispiel #3
0
        public static TagNames GetTagNamesForJson(String json)
        {
            TagNames tags = JsonConvert.DeserializeObject <TagNames>(json);

            return(tags);
        }