Ejemplo n.º 1
0
 public TokenProvider(string clientId, string clientSecret, IWebProxy webProxy = null, BoxManagerOptions options = BoxManagerOptions.None)
 {
     _clientId = clientId;
     _clientSecret = clientSecret;
     _requestHelper = new RequestHelper();
     _restClient = new BoxRestClient(null, webProxy, options);
 }
Ejemplo n.º 2
0
 public TokenProvider(string clientId, string clientSecret, IWebProxy webProxy = null, BoxManagerOptions options = BoxManagerOptions.None)
 {
     _clientId      = clientId;
     _clientSecret  = clientSecret;
     _requestHelper = new RequestHelper();
     _restClient    = new BoxRestClient(null, webProxy, options);
 }
Ejemplo n.º 3
0
 private BoxManager(IRequestAuthenticator requestAuthenticator, IWebProxy proxy, BoxManagerOptions options, string onBehalfOf = null)
     : this()
 {
     requestAuthenticator.SetOnBehalfOf(onBehalfOf);
     _restClient = new BoxRestClient(requestAuthenticator, proxy, options);
     _uploadClient = new BoxUploadClient(requestAuthenticator, proxy, options);
 }
Ejemplo n.º 4
0
 /// <summary>
 ///     Instantiates a BoxAuthenticator
 /// </summary>
 /// <param name="apiKey">The API key for your application</param>
 /// <param name="ticket">The ticket associated with the current authorization token request, if you already have one.</param>
 /// <param name="proxy">An optional web proxy that should be used in conjunction with any calls to Box</param>
 public BoxAuthenticator(string apiKey, string ticket = null, WebProxy proxy = null, BoxManagerOptions options = BoxManagerOptions.None)
 {
     ApiKey = apiKey;
     Ticket = ticket;
     Proxy = proxy;
     _requestHelper = new RequestHelper();
     _restClient = new BoxRestClient(new LegacyRequestAuthenticator(ApiKey, null), proxy, options);
 }
Ejemplo n.º 5
0
 /// <summary>
 ///     Instantiates a BoxAuthenticator
 /// </summary>
 /// <param name="apiKey">The API key for your application</param>
 /// <param name="ticket">The ticket associated with the current authorization token request, if you already have one.</param>
 /// <param name="proxy">An optional web proxy that should be used in conjunction with any calls to Box</param>
 public BoxAuthenticator(string apiKey, string ticket = null, WebProxy proxy = null, BoxManagerOptions options = BoxManagerOptions.None)
 {
     ApiKey         = apiKey;
     Ticket         = ticket;
     Proxy          = proxy;
     _requestHelper = new RequestHelper();
     _restClient    = new BoxRestClient(new LegacyRequestAuthenticator(ApiKey, null), proxy, options);
 }
Ejemplo n.º 6
0
 private void SetClient(IRequestAuthenticator requestAuthenticator, IWebProxy proxy, BoxManagerOptions options)
 {
     _restClient = new BoxRestClient(requestAuthenticator, proxy, options);
 }
Ejemplo n.º 7
0
 private BoxManager(IRequestAuthenticator requestAuthenticator, IWebProxy proxy, BoxManagerOptions options)
     : this()
 {
     _restClient = new BoxRestClient(requestAuthenticator, proxy, options);
     _uploadClient = new BoxUploadClient(requestAuthenticator, proxy, options);
 }