Esempio n. 1
0
        public void TokenIsExpiredHasCorrectValue()
        {
            var expiry = DateTime.UtcNow.AddSeconds(1).ToUnixTime();
            var token  = new ArcGIS.ServiceModel.Operation.Token {
                Value = "blah", Expiry = expiry
            };

            Assert.NotNull(token);
            Assert.NotNull(token.Value);
            Assert.False(token.IsExpired);
            Thread.Sleep(TimeSpan.FromSeconds(2));
            Assert.True(token.IsExpired);
        }
Esempio n. 2
0
 protected CommonParameters(String format, Token token)
 {
     Format = format;
     if (token != null) Token = token.Value;
 }
Esempio n. 3
0
 protected CommonParameters(Token token)
     : this("json", token)
 { }