/// <summary> /// /// </summary> /// <param name="guid">Format : Encode(PK:pkidx)-Guid</param> /// <returns></returns> public Pkuid Parse(string guid) { try { var part = guid.Trim().Split("-"); var seed = part[1].GetSum(); var b62c = new Base62Converter(seed); var part0 = b62c.Decode(part[0]).Split(":"); if (part0[0] != Prefix) { throw new Exception(); } var pkIdx = long.Parse(part0[1]); return(new Pkuid(pkIdx, Prefix, guid)); } catch (System.Exception) { throw new Exception("Unknown member id format!"); } }