ToXmlString static method

String ToXmlString(
  1. Set<UserConfigurationProperties> properties
)
Converts a combination of properties to its wire representation (the space separated xs:list used by the UserConfigurationProperties element). Mirrors C# [Flags] Enum.ToString() with the "," delimiter removed: the full combination is written as "All". The properties.

Implementation

static String ToXmlString(Set<UserConfigurationProperties> properties) {
  if (properties.isEmpty) {
    return "0";
  }

  if (properties.containsAll(All)) {
    return "All";
  }

  return UserConfigurationProperties.values
      .where(properties.contains)
      .map((property) => property.name)
      .join(" ");
}