public ShopConnectorService( IRepository <ShopConnectorConnectionRecord> connectionRepository, IRepository <ShopConnectorSkuMapping> skuMappingRepository, ICommonServices services, IDateTimeHelper dateTimeHelper, AdminAreaSettings adminAreaSettings, IManufacturerService manufacturerService, ITaxCategoryService taxCategoryService, Lazy <IMediaService> mediaService, Lazy <IPluginFinder> pluginFinder, Lazy <IRepository <StoreMapping> > storeMappingRepository, Lazy <ICategoryService> categoryService, Lazy <IExportProfileService> exportProfileService, Lazy <IDataExporter> dataExporter, Lazy <ICatalogSearchService> catalogSearchService, IAsyncState asyncState, ShopConnectorSettings shopConnectorSettings) { _connectionRepository = connectionRepository; _skuMappingRepository = skuMappingRepository; _services = services; _dateTimeHelper = dateTimeHelper; _adminAreaSettings = adminAreaSettings; _manufacturerService = manufacturerService; _taxCategoryService = taxCategoryService; _mediaService = mediaService; _pluginFinder = pluginFinder; _storeMappingRepository = storeMappingRepository; _categoryService = categoryService; _exportProfileService = exportProfileService; _dataExporter = dataExporter; _catalogSearchService = catalogSearchService; _asyncState = asyncState; _shopConnectorSettings = shopConnectorSettings; }
public ShopConnectorImportController( IShopConnectorService connectorService, IAsyncState asyncState) { _connectorService = connectorService; _asyncState = asyncState; }
/// <summary> /// Configura o cliente para o modo udp /// </summary> private void ConfigureUdp() { // udp não é baseado em conexão AsyncState = new AsyncState(this, Cfg, this, new byte[1024]); ((AsyncState)(AsyncState)).EndPoint = new IPEndPoint(IPAddress.Parse(Cfg.IP), Cfg.Port); ((AsyncState)(AsyncState)).BeginReceive(); }
public InstallController( IInstallationLocalizationService locService, IAsyncState asyncState) { _locService = locService; _asyncState = asyncState; Logger = NullLogger.Instance; }
private static void _DecrementAsyncRefCount(TClient client) { IAsyncState asyncState = _GetAsyncState(client); if (asyncState.RefCount > 0) { asyncState.RefCount--; } }
public InstallController( IHostApplicationLifetime hostApplicationLifetime, IApplicationContext appContext, IAsyncState asyncState) { _installService = EngineContext.Current.Scope.ResolveOptional <IInstallationService>(); _hostApplicationLifetime = hostApplicationLifetime; _appContext = appContext; _asyncState = asyncState; }
public DefaultTaskScheduler(IAsyncState asyncState) { _asyncState = asyncState; _sweepInterval = 1; _timer = new System.Timers.Timer(); _timer.Elapsed += Elapsed; Logger = NullLogger.Instance; HostingEnvironment.RegisterObject(this); }
private static IAsyncState _GetAsyncState(TClient client) { IAsyncState asyncState = client as IAsyncState; if (asyncState == null) { throw new InvalidOperationException(); } return(asyncState); }
IEnumerator OnEnter(IAsyncState state, params Func <IEnumerator>[] removes) { Debug.LogFormat("<color=orange>[{0}][ステート開始] {1} -> {2}</color>", Time.frameCount, currentState, state.GetType().Name); previousState = currentState; currentState = state; foreach (var cb in removes) { removableCoroutines.Remove(cb); } yield return(state.OnEnter()); }
public TaskExecutor( IScheduleTaskService scheduledTaskService, IComponentContext componentContext, IAsyncState asyncState, Func <Type, ITask> taskResolver) { _scheduledTaskService = scheduledTaskService; _componentContext = componentContext; _asyncState = asyncState; _taskResolver = taskResolver; Logger = LogManager.GetLogger(typeof(TaskExecutor)); }
public SchedulingController( ITaskStore taskStore, ITaskActivator taskActivator, ITaskScheduler taskScheduler, IAsyncState asyncState, CommonSettings commonSettings) { _taskStore = taskStore; _taskActivator = taskActivator; _taskScheduler = taskScheduler; _asyncState = asyncState; _commonSettings = commonSettings; }
public InstallationService( IHttpContextAccessor httpContextAccessor, IApplicationContext appContext, IAsyncState asyncState, IUrlHelper urlHelper, IEnumerable <Lazy <InvariantSeedData, InstallationAppLanguageMetadata> > seedDatas) { _httpContextAccessor = httpContextAccessor; _appContext = appContext; _asyncState = asyncState; _urlHelper = urlHelper; _seedDatas = seedDatas; }
public ScheduleTaskController( IScheduleTaskService scheduleTaskService, ITaskScheduler taskScheduler, IAsyncState asyncState, AdminModelHelper adminModelHelper, AdminAreaSettings adminAreaSettings, CommonSettings commonSettings) { _scheduleTaskService = scheduleTaskService; _taskScheduler = taskScheduler; _asyncState = asyncState; _adminModelHelper = adminModelHelper; _adminAreaSettings = adminAreaSettings; _commonSettings = commonSettings; }
public TaskExecutor( IScheduleTaskService scheduledTaskService, IComponentContext componentContext, IAsyncState asyncState, Func <Type, ITask> taskResolver, IApplicationEnvironment env) { _scheduledTaskService = scheduledTaskService; _componentContext = componentContext; _asyncState = asyncState; _taskResolver = taskResolver; _env = env; Logger = NullLogger.Instance; T = NullLocalizer.Instance; }
public DefaultTaskExecutor( ITaskStore taskStore, Func <Type, ITask> taskResolver, IComponentContext componentContext, IAsyncState asyncState, AsyncRunner asyncRunner, IApplicationContext appContext) { _taskStore = taskStore; _taskResolver = taskResolver; _componentContext = componentContext; _asyncState = asyncState; _asyncRunner = asyncRunner; _appContext = appContext; Logger = NullLogger.Instance; }
public TaskExecutor( ITaskStore taskStore, ITaskActivator taskActivator, IComponentContext componentContext, IAsyncState asyncState, AsyncRunner asyncRunner, IApplicationContext appContext) { _taskStore = taskStore; _taskActivator = taskActivator; _componentContext = componentContext; _asyncState = asyncState; _asyncRunner = asyncRunner; _appContext = appContext; Logger = NullLogger.Instance; }
public ScheduleTaskController( IScheduleTaskService scheduleTaskService, ITaskScheduler taskScheduler, IPermissionService permissionService, IDateTimeHelper dateTimeHelper, ILocalizationService localizationService, IWorkContext workContext, IAsyncState asyncState) { this._scheduleTaskService = scheduleTaskService; this._taskScheduler = taskScheduler; this._permissionService = permissionService; this._dateTimeHelper = dateTimeHelper; this._localizationService = localizationService; this._workContext = workContext; this._asyncState = asyncState; }
public ScheduleTaskController( IScheduleTaskService scheduleTaskService, ITaskScheduler taskScheduler, IPermissionService permissionService, IDateTimeHelper dateTimeHelper, ILocalizationService localizationService, IWorkContext workContext, IStoreContext storeContext, IAsyncState asyncState) { _scheduleTaskService = scheduleTaskService; _taskScheduler = taskScheduler; _permissionService = permissionService; _dateTimeHelper = dateTimeHelper; _localizationService = localizationService; _workContext = workContext; _storeContext = storeContext; _asyncState = asyncState; }
public TaskExecutor( IScheduleTaskService scheduledTaskService, IDbContext dbContext, ICustomerService customerService, IWorkContext workContext, IComponentContext componentContext, IAsyncState asyncState, Func <Type, ITask> taskResolver) { _scheduledTaskService = scheduledTaskService; _dbContext = dbContext; _workContext = workContext; _componentContext = componentContext; _asyncState = asyncState; _taskResolver = taskResolver; Logger = NullLogger.Instance; T = NullLocalizer.Instance; }
public LanguageController( ILanguageService languageService, IStoreMappingService storeMappingService, IGenericAttributeService genericAttributeService, AdminAreaSettings adminAreaSettings, IPluginFinder pluginFinder, ICountryService countryService, ICommonServices services, IDateTimeHelper dateTimeHelper, IAsyncState asyncState) { _languageService = languageService; _storeMappingService = storeMappingService; _genericAttributeService = genericAttributeService; _adminAreaSettings = adminAreaSettings; _pluginFinder = pluginFinder; _countryService = countryService; _services = services; _dateTimeHelper = dateTimeHelper; _asyncState = asyncState; }
private void _CloseClient(TClient client) { int refCount = 0; IAsyncState asyncState = client as IAsyncState; if (asyncState != null) { refCount = asyncState.RefCount; } if (refCount == 0) { try { this.OnCloseInnerClient(client); } catch { } // ignore errors ServiceHelper.CloseCommObject(client); } }
/// <summary> /// 状態変更をリクエストします. /// 実際に状態変更されるまでに別のリクエストがあった場合、リクエストは上書きされます. /// </summary> public IAsyncStateMachine ChangeState(IAsyncState state) { Debug.LogFormat("<color=red>[{0}][ステート変更リクエスト] {1} -> {2}</color>", Time.frameCount, currentState, state.GetType().Name); // ステート変更に伴い、削除リストにあるコルーチンを削除する. removableCoroutines.ForEach(x => queuedCoroutines.Remove(x)); removableCoroutines.Clear(); Func <IEnumerator> onUpdate = () => OnUpdate(state); Func <IEnumerator> onExit = () => OnExit(state); Func <IEnumerator> onEnter = () => OnEnter(state, onExit); // コルーチンキューに追加 queuedCoroutines.Add(onEnter); queuedCoroutines.Add(onUpdate); queuedCoroutines.Add(onExit); // ステート変更時の削除コルーチンを追加. removableCoroutines.Add(onEnter); removableCoroutines.Add(onUpdate); removableCoroutines.Add(onExit); return(this); }
IEnumerator OnExit(IAsyncState state) { yield return(state.OnExit()); Debug.LogFormat("<color=green>[{0}][ステート完了] {1}</color>", Time.frameCount, state.GetType().Name); }
private static void _IncrementAsyncRefCount(TClient client) { IAsyncState asyncState = _GetAsyncState(client); asyncState.RefCount++; }
public ConnectionEventArgs(IAsyncState state) { State = state; }
public ReceiveEventArgs(IAsyncState state) { State = state; }
IEnumerator OnUpdate(IAsyncState state) { yield return(state.OnUpdate()); state.OnUpdateComplete(); }
/// <summary> /// 新しい状態を登録します. /// </summary> public IAsyncStateMachine RegisterState(IAsyncState state) { states.Add(state); state.stateMachine = this; return(this); }
/// <summary> /// 指定したコールバックに新しい状態遷移を追加します. /// </summary> public IAsyncStateMachine AddTransition(ref Action action, IAsyncState state) { action += () => ChangeState(state); return(this); }