/// <summary>
 /// Initializes the node after being parsed by the parser.
 /// </summary>
 /// <param name="message">The first (current) message in the message sequence.</param>
 /// <param name="nextMessage">Optional sequence of messages that may follow this message.</param>
 protected internal void SetContents(BinaryMessageNode message, BinaryMessageSequenceNode nextMessage)
 {
     if (message == null)
     {
         throw new ArgumentNullException("message");
     }
     this.Message     = message;
     this.NextMessage = nextMessage; // Null is OK.
 }
 /// <summary>
 /// Initializes the node after being parsed by the parser.
 /// </summary>
 /// <param name="message">The first (current) message in the message sequence.</param>
 /// <param name="nextMessage">Optional sequence of messages that may follow this message.</param>
 protected internal void SetContents(BinaryMessageNode message, BinaryMessageSequenceNode nextMessage)
 {
     if (message == null)
         throw new ArgumentNullException("message");
     this.Message = message;
     this.NextMessage = nextMessage; // Null is OK.
 }
Exemplo n.º 3
0
        protected virtual BinaryMessageSequenceNode ParseBinaryMessageSequence(IMessageSequenceParentNode parent, BinarySelectorToken selector)
        {
            // PARSE: <binary message>*
            BinaryMessageSequenceNode result = new BinaryMessageSequenceNode(parent);

            // NB: ParseBinaryMessage() cannot fail, so we don't check result
            BinaryMessageNode message = this.ParseBinaryMessage(result, selector);

            Token token = this.GetNextTokenxx(Preference.Default);

            BinaryMessageSequenceNode nextMessage = null;
            if (token is BinarySelectorToken)
                nextMessage = this.ParseBinaryMessageSequence(result, (BinarySelectorToken)token);
            else
                this.ResidueToken = token;

            result.SetContents(message, nextMessage);
            return result;
        }