Exemple #1
0
        public IList<Tag> GetTags(Outlook.MailItem mailItem)
        {
            var existingTags=new List<Tag>();
            if(!MailHelper.HasUserProperty(mailItem,PropName))
            {
                return null;
            }

            var propValue=MailHelper.GetUserProperty(mailItem, PropName);
            var propString = propValue != null ? propValue.ToString() : string.Empty;

            propString.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries).ToList().ForEach(delegate(string str)
                                                              {
                                                                  var strBroken = str.Split(new string[]{"."},StringSplitOptions.RemoveEmptyEntries);
                                                                  var tg = new Tag()
                                                                               {
                                                                                   TagSource = strBroken[0],
                                                                                   TagName = strBroken[1]
                                                                               };
                                                                  existingTags.Add(tg);

                                                              });
            return existingTags;
        }
Exemple #2
0
 public string ParseToString(Tag tag)
 {
     return string.Format(CultureInfo.InvariantCulture, "{0}.{1}",
                                                                    tag.TagSource, tag.TagName);
 }