/// <summary>
        /// It returns the message.
        /// </summary>
        /// <param name="parserContext">
        /// It's the parser context.
        /// </param>
        /// <param name="message">
        /// The message to get the message field.
        /// </param>
        /// <returns>
        /// The message.
        /// </returns>
        public Message GetLeafMessage(ref ParserContext parserContext, Message message)
        {
            if (message == null)
            {
                message = parserContext.CurrentMessage;
            }

            return(_messageExpression.GetLeafMessage(ref parserContext, GetInnerMessage(message)));
        }
Example #2
0
 /// <summary>
 /// Evaluates the expression when parsing a message.
 /// </summary>
 /// <param name="parserContext">
 /// It's the parser context.
 /// </param>
 /// <returns>
 /// A boolean value.
 /// </returns>
 public bool EvaluateParse(ref ParserContext parserContext)
 {
     return(GetMessage(_messageExpression.GetLeafMessage(
                           ref parserContext, null)).MessageTypeIdentifier == _mti);
 }
Example #3
0
 /// <summary>
 /// Evaluates the expression when parsing a message.
 /// </summary>
 /// <param name="parserContext">
 /// It's the parser context.
 /// </param>
 /// <returns>
 /// A boolean value.
 /// </returns>
 public bool EvaluateParse(ref ParserContext parserContext)
 {
     return(_messageExpression.GetLeafMessage(ref parserContext,
                                              null).Fields.Contains(_messageExpression.GetLeafFieldNumber()));
 }