Ejemplo n.º 1
0
 public OCIAID(bool asid, IssuerType isstype, ApplicationType apptype, ISOCountryCode country, ulong id)
 {
     ArsslensoftAssigned = asid;
     IssuanceType        = isstype;
     Application         = apptype;
     Country             = country;
     Identifier          = id;
 }
Ejemplo n.º 2
0
        public static OCIAID Parse(string ociaid)
        {
            string[] oid  = ociaid.Split('-');
            string   org  = oid[0];
            bool     asid = false;

            if (org == "AS-OCIAID")
            {
                asid = true;
            }

            IssuerType it = IssuerType.Unknown;

            if (Enum.IsDefined(typeof(IssuerType), oid[1]))
            {
                it = (IssuerType)Enum.Parse(typeof(IssuerType), oid[1]);
            }

            ApplicationType app = ApplicationType.Unknown;

            if (Enum.IsDefined(typeof(ApplicationType), oid[2]))
            {
                app = (ApplicationType)Enum.Parse(typeof(ApplicationType), oid[2]);
            }

            ISOCountryCode country = ISOCountryCode.Unknown;

            if (Enum.IsDefined(typeof(ISOCountryCode), oid[3]))
            {
                country = (ISOCountryCode)Enum.Parse(typeof(ISOCountryCode), oid[3]);
            }

            ulong id = ulong.Parse(oid[4]);

            return(new OCIAID(asid, it, app, country, id));
        }