/// <summary> /// Evaluates the expression when formatting a message. /// </summary> /// <param name="field"> /// It's the field to format. /// </param> /// <param name="formatterContext"> /// It's the context of formatting to be used by the method. /// </param> /// <returns> /// A boolean value. /// </returns> public override bool EvaluateFormat(Field field, ref FormatterContext formatterContext) { return(CompareByteArrays(GetSet(MessageExpression.GetLeafFieldValueBytes( ref formatterContext, null)), _valueExpression.GetValue())); }
/// <summary> /// Evaluates the expression when parsing a message. /// </summary> /// <param name="parserContext"> /// It's the parser context. /// </param> /// <returns> /// A boolean value. /// </returns> public override bool EvaluateParse(ref ParserContext parserContext) { return(CompareByteArrays(GetSet(MessageExpression.GetLeafFieldValueBytes( ref parserContext, null)), _valueExpression.GetValue())); }