/// <summary> /// Write description of this constraint /// </summary> /// <param name="writer">The MessageWriter to write to</param> /// <exception cref="ArgumentNullException">if the message writer is null.</exception> public override void WriteDescriptionTo( MessageWriter writer ) { if ( writer == null ) { throw new ArgumentNullException( "writer" ); } writer.WriteExpectedValue( _expected ); if ( Tolerance != null ) { writer.WriteConnector( "+/-" ); writer.WriteExpectedValue( Tolerance ); } if ( CaseInsensitive ) { writer.WriteModifier( Resources.IgnoringCase ); } }
/// <summary> /// Write a description for this contraint to a MessageWriter /// </summary> /// <param name="writer">The MessageWriter to receive the description</param> /// <exception cref="ArgumentNullException">if the message writer is null.</exception> public override void WriteDescriptionTo( MessageWriter writer ) { if ( writer == null ) { throw new ArgumentNullException( "writer" ); } Left.WriteDescriptionTo( writer ); writer.WriteConnector( Resources.Or ); Right.WriteDescriptionTo( writer ); }
/// <summary> /// Write the constraint description to a MessageWriter /// </summary> /// <exception cref="ArgumentNullException">if the message writer is null.</exception> /// <param name="writer">The writer on which the description is displayed</param> public override void WriteDescriptionTo( MessageWriter writer ) { if ( writer == null ) { throw new ArgumentNullException( "writer" ); } writer.WritePredicate( Resources.Between ); writer.WriteExpectedValue( _low ); writer.WriteConnector( Resources.And ); writer.WriteExpectedValue( _high ); }