5 const string COMPONENT_SUFFIX =
"Component";
7 public static string AddComponentSuffix(
this string componentName) {
8 return componentName.EndsWith(COMPONENT_SUFFIX,
System.StringComparison.Ordinal)
10 : componentName + COMPONENT_SUFFIX;
13 public static string RemoveComponentSuffix(
this string componentName) {
14 return componentName.EndsWith(COMPONENT_SUFFIX,
System.StringComparison.Ordinal)
15 ? componentName.Substring(0, componentName.Length - COMPONENT_SUFFIX.Length)