/// <summary> /// Write a description of the constraint to a MessageWriter /// </summary> /// <param name="writer"></param> public override void WriteDescriptionTo(MessageWriter writer) { var description = new DescriptionDataTypeHelper(); var filterExpression = description.GetFilterExpression(Command.Description.Filters.Where(f => f.Target != Command.Description.Target)); var targetExpression = description.GetTargetExpression(Command.Description.Target); var captionExpression = Command.Description.Filters.Single(f => f.Target == Command.Description.Target).Caption; writer.WritePredicate(string.Format("the type of {0} '{1}' ({2}) is '{3}'" , targetExpression , captionExpression , filterExpression , expected.ToString())); }