예제 #1
0
            public static void RemoveCategory(this MailItem item, Category category)
            {
                List <string> categories = CategoryParser.ConvertToList(item.Categories);

                if (categories.Contains(category.Name))
                {
                    categories.Remove(category.Name);
                }
                item.Categories = CategoryParser.ConvertToString(categories);
            }
예제 #2
0
            public static void AddCategory(this MailItem item, string category)
            {
                List <string> categories = CategoryParser.ConvertToList(item.Categories);

                if (!categories.Contains(category))
                {
                    categories.Add(category);
                }
                item.Categories = CategoryParser.ConvertToString(categories);
            }