Example #1
0
        private string TypeToString(TypeType t)
        {
            if (t == TypeType.Other)
            {
                // This value requires no additional processing
                return(t.ToString());
            }

            // 1) Just convert to string
            var raw = t.ToString();

            // 2 A) Remove suffix of XML types
            if (raw.EndsWith(SuffixXml))
            {
                return(RemoveSuffix(raw, SuffixXml));
            }
            // 2 B) Remove suffix of UN/CEFACT types
            else if (raw.EndsWith(SuffixUnCefact))
            {
                return(RemoveSuffix(raw, SuffixUnCefact));
            }
            else
            {
                // If this happens, there is a bug somewhere
                throw new InvalidOperationException("Unexpected datatype value \"" + t.ToString() + "\"");
            }
        }
Example #2
0
        string FormatTypeType(TypeType typeType)
        {
            switch (typeType)
            {
            case TypeType.Command:
                return("Domain commands");

            case TypeType.Other:
                return("Domain primitives");

            case TypeType.Primitive:
                return("Built-in primitives");

            default:
                return(typeType.ToString());
            }
        }
        string FormatTypeType(TypeType typeType)
        {
            switch (typeType)
            {
                case TypeType.Command:
                    return "Domain commands";

                case TypeType.Other:
                    return "Domain primitives";

                case TypeType.Primitive:
                    return "Built-in primitives";

                default:
                    return typeType.ToString();
            }
        }
 public static string Show(this TypeType typeType) => typeType.ToString();