/// <summary> /// Returns a string representation of the search criteria /// </summary> /// <returns>A <see cref="string"/> representation of the search criteria</returns> public override string ToString() { var fieldName = FilterField.GetAttributeOfType <EnumMemberAttribute>().Value; var filterOperator = FilterOperator.GetAttributeOfType <EnumMemberAttribute>().Value; var filterValue = ValueAsString(FilterValue); return($"{fieldName}{filterOperator}{filterValue}"); }
/// <summary> /// Converts the filter operator into a string as expected by the SendGrid Email Activities API. /// Can be overridden in subclasses if the operator needs special formatting. /// </summary> /// <returns>The string representation of the operator.</returns> public virtual string ConvertOperatorToString() { return(FilterOperator.GetAttributeOfType <EnumMemberAttribute>()?.Value ?? FilterOperator.ToString()); }