예제 #1
0
        protected KnowledgeCard ConvertKnowledge(Knowledge knowledge)
        {
            var card = new KnowledgeCard()
            {
                Id          = $"{SharedStrings.ID}{knowledge.Id}",
                Title       = knowledge.Title,
                UpdatedTime = $"{SharedStrings.UpdatedAt}{knowledge.UpdatedTime.ToString()}",
                Content     = knowledge.Content,
                Speak       = knowledge.Title,
                Number      = $"{SharedStrings.TicketNumber}{knowledge.Number}",
                UrlTitle    = SharedStrings.OpenKnowledge,
                UrlLink     = knowledge.Url,
            };

            return(card);
        }
예제 #2
0
        protected KnowledgeCard ConvertKnowledge(Knowledge knowledge)
        {
            var card = new KnowledgeCard()
            {
                Id                  = string.Format(SharedStrings.ID, knowledge.Id),
                Title               = knowledge.Title,
                UpdatedTime         = string.Format(SharedStrings.UpdatedAt, knowledge.UpdatedTime.ToString()),
                Content             = knowledge.Content,
                Speak               = knowledge.Title,
                Number              = string.Format(SharedStrings.TicketNumber, knowledge.Number),
                UrlTitle            = SharedStrings.OpenKnowledge,
                UrlLink             = knowledge.Url,
                ProviderDisplayText = string.Format(SharedStrings.PoweredBy, knowledge.Provider),
            };

            return(card);
        }