public DropboxConnector(string clientId, string clientSecret, IUserTokenRepository repository) { if (repository == null) throw new ArgumentNullException("repository"); _repository = repository; var token = _repository.TryRetrieveTokenFromDatabase(HardcodedUser.Id); _accessToken = token.DropboxAccessToken; var options = new Options { ClientId = clientId, ClientSecret = clientSecret, RedirectUri = "http://localhost:52110/dropbox/oauth", UseSandbox = true, AccessToken = _accessToken }; _client = new Client(options); }