Ejemplo n.º 1
0
        public string BuildStringWithExpire(string data, DateTime expireTime)
        {
            var dict = new StringToken()
            {
                d = data,
                e = (long)((expireTime - new DateTime(1970, 1, 1)).TotalSeconds)
            };

            return(BuildForString(dict.ToJsonString()));
        }
Ejemplo n.º 2
0
        public string BuildStringWithExpire(string data, DateTime expireTime)
        {
            long time = (long)(expireTime - new DateTime(1970, 1, 1)).TotalSeconds;

            time = time * 1000 + new Random().Next(1, 999);

            var dict = new StringToken()
            {
                d = data,
                e = time
            };

            return(BuildForString(dict.ToJsonString()));
        }