Beispiel #1
0
        public static Uid Create(string value)
        {
            Check.Require(!string.IsNullOrEmpty(value), "value must not be null or empty.");

            Uid result = null;

            if (Uuid.IsValid(value))
                result = new Uuid(value);
            else if (IsoOid.IsValid(value))
                result = new IsoOid(value);
            else if (InternetId.IsValid(value))
                result = new InternetId(value);

            Check.Ensure(result != null, "value must be either an UUID, INTERNET_ID, or ISO_OID " + value);

            return result;
        }