コード例 #1
0
 public HttpFacade(
     IPushLogger logger, HttpClient client, FaultTolerantExecutor executor)
 {
     _logger   = logger;
     _client   = client;
     _executor = executor;
 }
コード例 #2
0
ファイル: PayoutApi.cs プロジェクト: stackthatcode/Monster
 public PayoutApi(
     IPushLogger logger,
     ShopifyHttpContext httpClient)
 {
     _logger     = logger;
     _httpClient = httpClient;
 }
コード例 #3
0
 public AcumaticaOrderPut(
     SyncOrderRepository syncOrderRepository,
     SyncInventoryRepository syncInventoryRepository,
     SalesOrderClient salesOrderClient,
     AcumaticaOrderRepository acumaticaOrderRepository,
     AcumaticaCustomerPut acumaticaCustomerSync,
     AcumaticaOrderPaymentPut acumaticaOrderPaymentPut,
     PendingActionService pendingActionService,
     JobMonitoringService jobMonitoringService,
     AcumaticaTimeZoneService acumaticaTimeZoneService,
     AcumaticaHttpContext acumaticaHttpContext,
     ShopifyJsonService shopifyJsonService,
     SettingsRepository settingsRepository,
     ExecutionLogService logRepository,
     IPushLogger systemLogger)
 {
     _syncOrderRepository      = syncOrderRepository;
     _syncInventoryRepository  = syncInventoryRepository;
     _salesOrderClient         = salesOrderClient;
     _acumaticaOrderRepository = acumaticaOrderRepository;
     _acumaticaCustomerSync    = acumaticaCustomerSync;
     _acumaticaOrderPaymentPut = acumaticaOrderPaymentPut;
     _acumaticaTimeZoneService = acumaticaTimeZoneService;
     _pendingActionService     = pendingActionService;
     _jobMonitoringService     = jobMonitoringService;
     _shopifyJsonService       = shopifyJsonService;
     _settingsRepository       = settingsRepository;
     _logService           = logRepository;
     _systemLogger         = systemLogger;
     _acumaticaHttpContext = acumaticaHttpContext;
 }
コード例 #4
0
        public static void Process(
            string key,
            int timeBetweenCallsMs = 0,
            IPushLogger logger     = null)
        {
            if (logger == null)
            {
                logger = new ConsoleAndDebugLogger();
            }

            if (LastExecutionTime.ContainsKey(key))
            {
                var lastExecutionTime = LastExecutionTime[key];

                var timeSinceLastExecution = DateTime.UtcNow - lastExecutionTime;
                var throttlingDelay        = new TimeSpan(0, 0, 0, 0, timeBetweenCallsMs);

                if (timeSinceLastExecution < throttlingDelay)
                {
                    var remainingTimeToDelay = throttlingDelay - timeSinceLastExecution;

                    logger.Debug($"Intentional delay before next call: {remainingTimeToDelay} ms");

                    Thread.Sleep(remainingTimeToDelay);
                }
            }

            LastExecutionTime[key] = DateTime.UtcNow;
        }
コード例 #5
0
 public ShopifyPayoutPullWorker(
     PayoutPersistRepository persistRepository,
     PayoutApi payoutRepository,
     IPushLogger logger)
 {
     _persistRepository = persistRepository;
     _payoutRepository  = payoutRepository;
     _logger            = logger;
 }
コード例 #6
0
 public BankImportService(
     IPushLogger logger,
     ShopifyPayoutRepository persistRepository,
     Screen screen)
 {
     _logger            = logger;
     _persistRepository = persistRepository;
     _screen            = screen;
 }
コード例 #7
0
        public AcumaticaPayoutPushWorkerScreen(

            IPushLogger logger,
            PayoutPersistRepository persistRepository,
            Screen screen)
        {
            _logger            = logger;
            _persistRepository = persistRepository;
            _screen            = screen;
        }
コード例 #8
0
 public ShopifyDataFeeder(
     InstanceContext connection,
     OrderApi orderApi,
     CustomerApi customerApi,
     IPushLogger logger)
 {
     _connection  = connection;
     _orderApi    = orderApi;
     _customerApi = customerApi;
     _logger      = logger;
 }
コード例 #9
0
 public ProvisioningService(
     MasterRepository masterRepository,
     PushIdentityDbContext dbContext,
     IdentityUserManager userManager,
     IdentityRoleManager roleManager,
     IPushLogger logger)
 {
     _masterRepository = masterRepository;
     _dbContext        = dbContext;
     _userManager      = userManager;
     _roleManager      = roleManager;
     _logger           = logger;
 }
コード例 #10
0
 public ShopifyPayoutPullWorker(
     CredentialsRepository connectionRepository,
     ShopifyBatchRepository shopifyBatchRepository,
     ShopifyPayoutRepository persistRepository,
     SettingsRepository settingsRepository,
     PayoutApi payoutApi,
     IPushLogger logger)
 {
     _connectionRepository   = connectionRepository;
     _shopifyBatchRepository = shopifyBatchRepository;
     _persistRepository      = persistRepository;
     _settingsRepository     = settingsRepository;
     _payoutApi = payoutApi;
     _logger    = logger;
 }
コード例 #11
0
ファイル: JobRunner.cs プロジェクト: stackthatcode/Monster
 public JobRunner(
     ProcessDirector processDirector,
     InstanceContext instanceContext,
     JobMonitoringService jobMonitoringService,
     ExecutionLogService executionLogService,
     OneTimeJobScheduler oneTimeJobScheduler,
     IPushLogger logger)
 {
     _processDirector      = processDirector;
     _instanceContext      = instanceContext;
     _jobMonitoringService = jobMonitoringService;
     _executionLogService  = executionLogService;
     _oneTimeJobScheduler  = oneTimeJobScheduler;
     _logger = logger;
 }
コード例 #12
0
 public ShopifyInventoryPut(
     InventoryApi inventoryApi,
     ProductApi productApi,
     ShopifyInventoryRepository inventoryRepository,
     SyncInventoryRepository syncInventoryRepository,
     SettingsRepository settingsRepository,
     ExecutionLogService executionLogService,
     IPushLogger logger, AcumaticaJsonService acumaticaJsonService)
 {
     _inventoryApi            = inventoryApi;
     _productApi              = productApi;
     _inventoryRepository     = inventoryRepository;
     _syncInventoryRepository = syncInventoryRepository;
     _settingsRepository      = settingsRepository;
     _executionLogService     = executionLogService;
     _logger = logger;
     _acumaticaJsonService = acumaticaJsonService;
 }
コード例 #13
0
 public AcumaticaManager(
     AcumaticaHttpContext acumaticaHttpContext,
     AcumaticaReferenceGet acumaticaReferencePull,
     AcumaticaCustomerGet acumaticaCustomerPull,
     AcumaticaOrderGet acumaticaOrderPull,
     AcumaticaWarehouseGet acumaticaWarehousePull,
     AcumaticaInventoryGet acumaticaInventoryPull,
     StateRepository stateRepository,
     ExecutionLogService executionLogService,
     IPushLogger logger)
 {
     _acumaticaHttpContext   = acumaticaHttpContext;
     _acumaticaCustomerPull  = acumaticaCustomerPull;
     _acumaticaOrderPull     = acumaticaOrderPull;
     _acumaticaWarehousePull = acumaticaWarehousePull;
     _acumaticaInventoryPull = acumaticaInventoryPull;
     _executionLogService    = executionLogService;
     _acumaticaReferencePull = acumaticaReferencePull;
 }
コード例 #14
0
        public AcumaticaRefundPut(

            SyncOrderRepository syncOrderRepository,
            SyncInventoryRepository syncRepository,
            SalesOrderClient salesOrderClient,
            SettingsRepository settingsRepository,
            ExecutionLogService logService,
            AcumaticaOrderGet acumaticaOrderPull,
            AcumaticaOrderPut acumaticaOrderSync,
            IPushLogger logger)
        {
            _syncOrderRepository = syncOrderRepository;
            _salesOrderClient    = salesOrderClient;
            _settingsRepository  = settingsRepository;
            _logService          = logService;
            _acumaticaOrderPull  = acumaticaOrderPull;
            _acumaticaOrderSync  = acumaticaOrderSync;
            _syncRepository      = syncRepository;
            _logger = logger;
        }
コード例 #15
0
 public ShopifyFulfillmentPut(
     ShopifyOrderRepository shopifyOrderRepository,
     SyncOrderRepository syncOrderRepository,
     SyncInventoryRepository syncInventoryRepository,
     FulfillmentApi fulfillmentApi,
     ExecutionLogService logService,
     FulfillmentStatusService fulfillmentStatusService,
     IPushLogger pushLogger, JobMonitoringService jobMonitoringService,
     ShopifyJsonService shopifyJsonService)
 {
     _shopifyOrderRepository  = shopifyOrderRepository;
     _syncOrderRepository     = syncOrderRepository;
     _syncInventoryRepository = syncInventoryRepository;
     _fulfillmentApi          = fulfillmentApi;
     _logService = logService;
     _fulfillmentStatusService = fulfillmentStatusService;
     _pushLogger           = pushLogger;
     _jobMonitoringService = jobMonitoringService;
     _shopifyJsonService   = shopifyJsonService;
 }
コード例 #16
0
 public ShopifyInventoryGet(
     IPushLogger logger,
     ProductApi productApi,
     InventoryApi inventoryApi,
     EventApi eventApi,
     ShopifyInventoryRepository inventoryRepository,
     JobMonitoringService jobMonitoringService,
     ShopifyBatchRepository batchRepository,
     ExecutionLogService executionLogService, ShopifyJsonService shopifyJsonService)
 {
     _productApi           = productApi;
     _inventoryApi         = inventoryApi;
     _eventApi             = eventApi;
     _inventoryRepository  = inventoryRepository;
     _jobMonitoringService = jobMonitoringService;
     _batchRepository      = batchRepository;
     _executionLogService  = executionLogService;
     _shopifyJsonService   = shopifyJsonService;
     _logger = logger;
 }
コード例 #17
0
 public ShopifyManager(
     ShopifyReferenceGet shopifyReferenceGet,
     ShopifyInventoryGet shopifyInventoryPull,
     ShopifyCustomerGet shopifyCustomerPull,
     ShopifyOrderGet shopifyOrderPull,
     ShopifyTransactionGet shopifyTransactionPull,
     ExecutionLogService executionLogService,
     StateRepository stateRepository,
     IPushLogger logger,
     OrderApi orderApi)
 {
     _shopifyReferenceGet    = shopifyReferenceGet;
     _shopifyInventoryPull   = shopifyInventoryPull;
     _shopifyCustomerPull    = shopifyCustomerPull;
     _shopifyOrderPull       = shopifyOrderPull;
     _shopifyTransactionPull = shopifyTransactionPull;
     _executionLogService    = executionLogService;
     _stateRepository        = stateRepository;
     _logger   = logger;
     _orderApi = orderApi;
 }
コード例 #18
0
 public IdentityService(
     MasterRepository masterRepository,
     PushIdentityDbContext dbContext,
     IdentityUserManager userManager,
     IdentityRoleManager roleManager,
     IdentitySignInManager signInManager,
     InstanceContext instanceContext,
     StateRepository stateRepository,
     IPushLogger logger,
     ShopifyUrlService shopifyUrlService)
 {
     _masterRepository  = masterRepository;
     _dbContext         = dbContext;
     _userManager       = userManager;
     _roleManager       = roleManager;
     _signInManager     = signInManager;
     _instanceContext   = instanceContext;
     _stateRepository   = stateRepository;
     _logger            = logger;
     _shopifyUrlService = shopifyUrlService;
 }
コード例 #19
0
 public ShopifyAuthController(
     OAuthApi oAuthApi,
     CredentialsRepository connectionRepository,
     InstanceContext connectionContext,
     ShopifyHttpContext shopifyHttpContext,
     IdentityService identityService,
     StateRepository stateRepository,
     HmacCryptoService hmacCrypto,
     ProvisioningService provisioningService,
     IPushLogger logger)
 {
     _provisioningService  = provisioningService;
     _identityService      = identityService;
     _oAuthApi             = oAuthApi;
     _connectionRepository = connectionRepository;
     _connectionContext    = connectionContext;
     _shopifyHttpContext   = shopifyHttpContext;
     _stateRepository      = stateRepository;
     _hmacCrypto           = hmacCrypto;
     _logger = logger;
 }
コード例 #20
0
        public SyncManager(
            AcumaticaHttpContext acumaticaContext,
            AcumaticaCustomerPut acumaticaCustomerSync,
            AcumaticaOrderPut acumaticaOrderSync,
            AcumaticaStockItemPut acumaticaInventorySync,
            AcumaticaRefundPut acumaticaRefundSync,
            AcumaticaOrderPaymentPut acumaticaPaymentSync,

            WarehouseLocationSync warehouseLocationSync,
            ShopifyInventoryPut shopifyInventorySync,
            ShopifyFulfillmentPut shopifyFulfillmentSync,
            ShopifyProductVariantPut shopifyProductVariantPut,

            JobMonitoringService monitoringService,
            SettingsRepository settingsRepository,
            InstanceContext connectionContext,
            ExecutionLogService executionLogService,
            ILifetimeScope lifetimeScope,
            IPushLogger logger)
        {
            _warehouseLocationSync = warehouseLocationSync;

            _acumaticaCustomerSync  = acumaticaCustomerSync;
            _acumaticaInventorySync = acumaticaInventorySync;
            _acumaticaRefundSync    = acumaticaRefundSync;
            _acumaticaPaymentSync   = acumaticaPaymentSync;
            _acumaticaOrderSync     = acumaticaOrderSync;

            _shopifyInventorySync     = shopifyInventorySync;
            _shopifyFulfillmentSync   = shopifyFulfillmentSync;
            _shopifyProductVariantPut = shopifyProductVariantPut;
            _monitoringService        = monitoringService;

            _acumaticaContext    = acumaticaContext;
            _settingsRepository  = settingsRepository;
            _connectionContext   = connectionContext;
            _executionLogService = executionLogService;
            _lifetimeScope       = lifetimeScope;
            _logger = logger;
        }
コード例 #21
0
 public AcumaticaOrderPaymentPut(
     SyncOrderRepository syncOrderRepository,
     PaymentClient paymentClient,
     SettingsRepository settingsRepository,
     ExecutionLogService logService,
     PendingActionService pendingActionService,
     JobMonitoringService jobMonitoringService,
     AcumaticaTimeZoneService acumaticaTimeZoneService,
     InvoiceClient invoiceClient,
     IPushLogger systemLogger, ShopifyJsonService shopifyJsonService)
 {
     _syncOrderRepository      = syncOrderRepository;
     _paymentClient            = paymentClient;
     _settingsRepository       = settingsRepository;
     _pendingActionService     = pendingActionService;
     _systemLogger             = systemLogger;
     _shopifyJsonService       = shopifyJsonService;
     _jobMonitoringService     = jobMonitoringService;
     _acumaticaTimeZoneService = acumaticaTimeZoneService;
     _invoiceClient            = invoiceClient;
     _logService = logService;
 }
コード例 #22
0
ファイル: ProductApi.cs プロジェクト: stackthatcode/Monster
 public ProductApi(ShopifyHttpContext client, IPushLogger logger)
 {
     _httpClient = client;
     _logger     = logger;
 }
コード例 #23
0
 public AutofacScopeTester(IPushLogger logger, ProcessPersistContext persist)
 {
     _logger  = logger;
     _persist = persist;
 }
コード例 #24
0
 public HangfireLogger(IPushLogger logger)
 {
     _logger = logger;
 }
コード例 #25
0
 public ExecutionLogService(MiscPersistContext dataContext, IPushLogger logger)
 {
     _dataContext = dataContext;
     _logger      = logger;
 }
コード例 #26
0
 public ShopifyHttpContext(ShopifyHttpConfig httpConfig, IPushLogger logger)
 {
     _httpConfig = httpConfig;
     _logger     = logger;
 }
コード例 #27
0
 public static void RegisterInstance(IPushLogger loggerInstance)
 {
     _loggerInstance = loggerInstance;
 }
コード例 #28
0
 public InventoryApi(IPushLogger logger, ShopifyHttpContext httpClient)
 {
     _logger     = logger;
     _httpClient = httpClient;
 }
コード例 #29
0
 public BankClient(HttpFacade clientFacade, IPushLogger logger)
 {
     _clientFacade = clientFacade;
     _logger       = logger;
 }
コード例 #30
0
 public InvoiceClient(IPushLogger logger, AcumaticaHttpContext httpContext, AcumaticaHttpConfig config)
 {
     _logger      = logger;
     _httpContext = httpContext;
     _config      = config;
 }