Пример #1
0
 public ModelDerivative(Auth.Token accessToken)
 {
     if (accessToken != null && !string.IsNullOrWhiteSpace(accessToken.AccessToken))
     {
         token = accessToken;
     }
 }
Пример #2
0
        public OSSRequest(Auth.Token token)
        {
            if (token == null || string.IsNullOrWhiteSpace(token.AccessToken) || token.ExpiresAt < DateTime.UtcNow)
            {
                throw new Exception("OSS Configuration Error.");
            }

            this.token = token;
            client     = new RestClient();
        }