Ejemplo n.º 1
0
 void ReportInvalidMessage(
     TextMessage message,
     TextMessageParsingResult parsingResult,
     DataCollectorId dataCollectorId,
     bool unknown,
     CaseReporting caseReporting,
     DateTimeOffset timestamp)
 {
     if (!unknown)
     {
         caseReporting.ReportInvalidReport(
             dataCollectorId,
             message.Message,
             parsingResult.ErrorMessages,
             timestamp);
     }
     else
     {
         caseReporting.ReportInvalidReportFromUnknownDataCollector(
             message.OriginNumber,
             message.Message,
             parsingResult.ErrorMessages,
             timestamp);
     }
 }
Ejemplo n.º 2
0
        /// <inheritdoc/>
        public TextMessageParsingResult Parse(TextMessage textMessage)
        {
            var content   = textMessage.Message;
            var fragments = content.Replace(" ", string.Empty).Split('#').Select(s => new TextMessageFragment(s));
            var result    = new TextMessageParsingResult(fragments);

            return(result);
        }