예제 #1
0
        /// <summary>
        /// Analizza il contenuto di content e converte i Tag in Valori
        /// </summary>
        /// <param name="content">Testo da analizzare</param>
        /// <param name="LangCode">Codice lingua</param>
        /// <param name="DateTimeFormat">Formato data/ora</param>
        /// <param name="BaseUrl">BaseUrl dell'applicazione</param>
        /// <param name="IntTicketStatus"></param>
        /// <param name="IntCategoryType"></param>
        /// <param name="CategoriesTemplate"></param>
        /// <returns></returns>
        public String AnalyzeContent(
            String content,
            DTO_NotificationSettings Settings
            )
        {
            if (User != null)
            {
                content = User.AnalyzeContent(content, Settings.DateTimeFormat, Settings.BaseUrl);
            }
            else
            {
                content = Notification.DTO_User.RemoveTags(content);
            }

            if (Ticket != null)
            {
                content = Ticket.AnalyzeContent(content, Settings.DateTimeFormat, Settings.AvailableTicketStatus, Settings.LangCode, Settings.BaseUrl);
            }
            else
            {
                content = Notification.DTO_Ticket.RemoveTags(content);
            }

            if (Category != null)
            {
                content = Category.AnalyzeContent(content, Settings.AvailableCategoryTypes, Settings.CategoriesTemplate);
            }
            else
            {
                content = Notification.DTO_Category.RemoveTags(content);
            }

            if (Answer != null)
            {
                content = Answer.AnalyzeContent(content);
            }
            else
            {
                content = Notification.DTO_Answer.RemoveTags(content);
            }

            if (Action != null)
            {
                content = Action.AnalyzeContent(content);
            }
            else
            {
                content = Notification.DTO_Action.RemoveTags(content);
            }

            return(content);
        }