예제 #1
0
 public WebRequestServices(TrueShipConfiguration config, ThrottlerAsync throttler)
 {
     Condition.Requires(config, "config").IsNotNull();
     this._config    = config;
     this._throttler = throttler;
     JsonCustomSerializationOptionsProvider.Setup();
 }
예제 #2
0
        public TrueShipCommonService(TrueShipConfiguration config, IWebRequestServices webRequestServices)
        {
            Condition.Requires(config, "config").IsNotNull();
            Condition.Requires(webRequestServices, "webRequestServices").IsNotNull();

            this._webRequestServices = webRequestServices;
            this._requestService     = new RequestCreatorService(config.Credentials.AccessToken);
            this._paginationService  = new PaginationService(this._webRequestServices);
        }
예제 #3
0
 public ITrueShipCommonService CreateCommonService(TrueShipConfiguration config)
 {
     return(new TrueShipCommonService(config));
 }
예제 #4
0
 public TrueShipCommonService(TrueShipConfiguration config)
     : this(config, new WebRequestServices(config, new ThrottlerAsync()))
 {
 }