Ejemplo n.º 1
0
 public static bool IsValid(string value)
 {
     if (Uuid.IsValid(value))
     {
         return(true);
     }
     if (IsoOid.IsValid(value))
     {
         return(true);
     }
     return(InternetId.IsValid(value));
 }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 3
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);
        }