Apache.NMS.ActiveMQ.NetTxConnection.GuidFromId C# (CSharp) Method

GuidFromId() private static method

private static GuidFromId ( string id ) : System.Guid
id string
return System.Guid
        private static Guid GuidFromId(string id)
        {
            // Remove the ID: prefix, that's non-unique to be sure
            string resId = id.TrimStart("ID:".ToCharArray());

            // Remaing parts should be host-port-timestamp-instance:sequence
            string[] parts = resId.Split(":-".ToCharArray());

            // We don't use the hostname here, just the remaining bits.
            int a = Int32.Parse(parts[1]);
            short b = Int16.Parse(parts[3]);
            short c = Int16.Parse(parts[4]);
            byte[] d = System.BitConverter.GetBytes(Int64.Parse(parts[2]));

            return new Guid(a, b, c, d);
        }