The MessageContent element represents the content of a message: its properties, the recipients, and the attachments.
Inheritance: SyntacticalBase
コード例 #1
0
 /// <summary>
 /// Parse fields from a FastTransferStream.
 /// </summary>
 /// <param name="stream">A FastTransferStream.</param>
 public override void Parse(FastTransferStream stream)
 {
     if (stream.ReadMarker() == Markers.StartEmbed)
     {
         this.StartMarker = Markers.NewAttach;
         this.MessageContent = new MessageContent(stream);
         if (stream.ReadMarker() == Markers.EndEmbed)
         {
             this.EndMarker = Markers.EndEmbed;
         }
         else
         {
             throw new Exception("The EmbeddedMessage cannot be parsed successfully. The EndEmbed Marker is missed.");
         }
     }
 }
コード例 #2
0
        /// <summary>
        /// Parse fields from a FastTransferStream.
        /// </summary>
        /// <param name="stream">A FastTransferStream.</param>
        public override void Parse(FastTransferStream stream)
        {
            Markers marker = stream.ReadMarker();
            if (marker == Markers.StartMessage || marker == Markers.StartFAIMsg)
            {
                if (marker == Markers.StartMessage)
                { this.StartMarker1 = Markers.StartMessage; }
                else
                { this.StartMarker2 = Markers.StartFAIMsg; }

                this.Content = new MessageContent(stream);
                if (stream.ReadMarker() == Markers.EndMessage)
                {
                    this.EndMarker = Markers.EndMessage;
                }
                else
                {
                    throw new Exception("The Message cannot be parsed successfully. The EndMessage Marker is missed.");
                }
            }
        }