Exemplo n.º 1
0
        public static uint FromShortString(string idString)
        {
            var idBytes = Safe32EncodingExtension.DecodeBytes(idString);

            if (BitConverter.IsLittleEndian)
            {
                Array.Reverse(idBytes);
            }

            var id = BitConverter.ToUInt32(idBytes, 0);

            return(id);
        }
Exemplo n.º 2
0
        public static string ToShortString(uint id)
        {
            var idBytes = BitConverter.GetBytes(id);

            if (BitConverter.IsLittleEndian)
            {
                Array.Reverse(idBytes);
            }

            var idString = Safe32EncodingExtension.EncodeBytes(idBytes);

            return(idString);
        }