Beispiel #1
0
 private static ICollection<Tag> TryGetTags(string message)
 {
     if (message == null)
     {
         return null;
     }
     var tagBusinessLogic = new TagBusinessLogic(new TagRepository(new DatabaseFactory()));
     Regex r = new Regex(@"#\S+(\s|)");
     var result = new List<Tag>();
     var matc = r.Matches(message);
     if (matc != null)
     {
         foreach (var match in matc)
         {
             result.Add(tagBusinessLogic.GetByNameOrCreate(match.ToString()));
         }
     }
     return result;
 }
Beispiel #2
0
 public TagUILogic()
 {
     _tagBusinessLogic   = new TagBusinessLogic();
     _tagCategoryUiLogic = new TagCategoryUILogic();
 }