/// <summary>
        /// Converts the string representation of an entity identifier into the equivalent StringUdi instance.
        /// </summary>
        /// <param name="s">The string to convert.</param>
        /// <returns>A StringUdi instance that contains the value that was parsed.</returns>
        public new static StringUdi Parse(string s)
        {
            var udi = Udi.Parse(s);

            if (!(udi is StringUdi))
            {
                throw new FormatException("String \"" + s + "\" is not a string entity id.");
            }
            return((StringUdi)udi);
        }
Esempio n. 2
0
        /// <summary>
        /// Converts the string representation of an entity identifier into the equivalent GuidUdi instance.
        /// </summary>
        /// <param name="s">The string to convert.</param>
        /// <returns>A GuidUdi instance that contains the value that was parsed.</returns>
        public new static GuidUdi Parse(string s)
        {
            var udi = Udi.Parse(s);

            if (udi is GuidUdi == false)
            {
                throw new FormatException("String \"" + s + "\" is not a guid entity id.");
            }

            return((GuidUdi)udi);
        }