예제 #1
0
        public static OrderIdentifier Parse(string s)
        {
            if (SolidCode.TryParseGuid(s, Prefix, out var guid))
            {
                return(new OrderIdentifier(guid));
            }

            throw new Exception("Invalid id");
        }
예제 #2
0
        public static OrderLineIdentifier Parse(string id)
        {
            if (SolidCode.TryParseUInt(id, Prefix, out var value))
            {
                return(new OrderLineIdentifier(value));
            }

            throw new Exception($"Cannot parse id {id}");
        }