toString method

  1. @override
String toString()
override
Returns a

Implementation

@override
String toString() {
  String? addressPart;

  if (StringUtils.IsNullOrEmpty(this.Address)) {
    return "";
  }

  if (!StringUtils.IsNullOrEmpty(this.RoutingType)) {
    addressPart = this.RoutingType! + ":" + this.Address!;
  } else {
    addressPart = this.Address;
  }

  if (!StringUtils.IsNullOrEmpty(this.Name)) {
    return this.Name! + " <" + addressPart! + ">";
  } else {
    return addressPart!;
  }
}