public ReminderService(MonkeyDBContext dbContext, DiscordClient discordClient, ISchedulingService schedulingService, ILogger <ReminderService> logger) { _dbContext = dbContext; _discordClient = discordClient; _schedulingService = schedulingService; _logger = logger; }
public BattlefieldNewsService(DiscordSocketClient discordClient, IGuildService guildService, ISchedulingService schedulingService, ILogger <BattlefieldNewsService> logger) { this.discordClient = discordClient; this.guildService = guildService; this.schedulingService = schedulingService; this.logger = logger; }
public CreateNewEventViewModel( IValidationObjectFactory validationObjectFactory, ITeamActionsManagmentDataItems teamActionsManagmentDataItems, ISchedulingService schedulingService) : base( validationObjectFactory, teamActionsManagmentDataItems, schedulingService) { GameManagingHeader = CREATE_NEW_EVENT_HEADER; IsSaveAndCreateAnotherCommandAvalilable = true; SaveCommand = new Command(async() => { Guid busyKey = Guid.NewGuid(); SetBusy(busyKey, true); ResetCancellationTokenSource(ref _createEventCancellationTokenSource); CancellationTokenSource cancellationTokenSource = _createEventCancellationTokenSource; EventDTO eventAction = await CreateNewEventAsync(cancellationTokenSource); if (eventAction != null) { await NavigationService.GoBackAsync(); } SetBusy(busyKey, false); }); }
/// <param name="SchedulingService"></param> /// <param name="loggingInstance"></param> /// <param name="loghandler"></param> public SchedulingController(ISchedulingService SchedulingService, ILog loggingInstance, LoggingCommandHandlerDecorator <LogCommand> loghandler) { _SchedulingService = SchedulingService; _loggingInstance = loggingInstance; _logHandler = loghandler; }
public CalendarPartDriver(ICalendarService calendarService, ISchedulingService eventService) { _calendarService = calendarService; _eventService = eventService; T = NullLocalizer.Instance; }
public FeedService(MonkeyDBContext dbContext, DiscordSocketClient discordClient, ISchedulingService schedulingService, ILogger <FeedService> logger) { this.dbContext = dbContext; this.discordClient = discordClient; this.schedulingService = schedulingService; this.logger = logger; }
public void Initialize() { _mockRepository = new Mock <ISchedulingRepository>(); _service = new SchedulingService(_mockRepository.Object); _mockEmployee = new Mock <Employee>(); _mockRoom = new Mock <Room>(); }
public BattlefieldNewsService(DiscordClient discordClient, IGuildService guildService, ISchedulingService schedulingService, ILogger <BattlefieldNewsService> logger) { _discordClient = discordClient; _guildService = guildService; _schedulingService = schedulingService; _logger = logger; }
public EditGameViewModel( IValidationObjectFactory validationObjectFactory, ITeamActionsManagmentDataItems teamActionsManagmentDataItems, ISchedulingService schedulingService) : base( validationObjectFactory, teamActionsManagmentDataItems, schedulingService) { GameManagingHeader = EDIT_GAME_HEADER; SaveCommand = new Command(async() => { Guid busyKey = Guid.NewGuid(); SetBusy(busyKey, true); ResetCancellationTokenSource(ref _updateGameCancellationTokenSource); CancellationTokenSource cancellationTokenSource = _updateGameCancellationTokenSource; GameDTO createdGame = await UpdateGameAsync(cancellationTokenSource); if (createdGame != null) { await NavigationService.GoBackAsync(); } SetBusy(busyKey, false); }); }
public static void Start() { logger.Info("Conectandose a las bases de datos..."); CreateRepositories(); var cronExpression = ConfigurationManager.AppSettings["scheduleConfig"]; logger.InfoFormat("Configurando servicio con la expresión '{0}'...", cronExpression); _schedulingService = new SchedulingService(); _schedulingService.LogFactory = new LogFactory(); _schedulingService.At(cronExpression).Run(() => { if (!_isRunning) { _isRunning = true; return(new ClientJob( _clientRepository, () => { _isRunning = false; })); } return(new DumClientJob()); }); _schedulingService.Start(); logger.Info("Servicio corriendo..."); }
/// <summary> /// Starts the server-side stream. /// </summary> public override void Start() { if (_state != State.UNINIT) { throw new NotSupportedException("State " + _state + " not valid to start"); } if (_items.Count == 0) { throw new NotSupportedException("At least one item should be specified to start"); } if (_publishedName == null) { throw new NotSupportedException("A published name is needed to start"); } // publish this server-side stream IProviderService providerService = this.Scope.GetService(typeof(IProviderService)) as IProviderService; providerService.RegisterBroadcastStream(this.Scope, _publishedName, this); _recordPipe = new InMemoryPushPushPipe(); #if !(NET_1_1) Dictionary <string, object> recordParamMap = new Dictionary <string, object>(); #else Hashtable recordParamMap = new Hashtable(); #endif recordParamMap.Add("record", null); _recordPipe.Subscribe((IProvider)this, recordParamMap); _recordingFilename = null; _schedulingService = this.Scope.GetService(typeof(ISchedulingService)) as ISchedulingService; _state = State.STOPPED; _currentItemIndex = -1; NextItem(); }
public DoctorController(IDoctorBasicService doctorBasicService, UserManager <MyUser> userManager, RoleManager <IdentityRole> roleManager, ISpecialityDoctorService specialityDoctorService, ISchedulingService schedulingService) { _doctorBasicService = doctorBasicService; _userManager = userManager; _roleManager = roleManager; _specialityDoctorService = specialityDoctorService; _schedulingService = schedulingService; }
public BlockController(IBlockService blockService, IDoctorBasicService doctorService, ISchedulingService schedulingService, ICustomerService customerService, ITicketService ticketService) { _blockService = blockService; _doctorService = doctorService; _schedulingService = schedulingService; _customerService = customerService; _ticketService = ticketService; }
protected BaseGameServerService(GameServerType gameServerType, MonkeyDBContext dbContext, DiscordClient discordClient, ISchedulingService schedulingService, ILogger <IGameServerService> logger) { _gameServerType = gameServerType; _dbContext = dbContext; _discordClient = discordClient; _schedulingService = schedulingService; _logger = logger; }
private static void ServiceSetup(ISchedulingService service) { var crontab = ConfigurationManager.AppSettings["crontab"]; service .At(crontab) .Run<Job>() .Named("mongo"); }
static void ServiceSetup(ISchedulingService service) { service.LogFactory = new NCron.Integration.log4net.LogFactory(); string cron = ConfigurationManager.AppSettings["cron"].ToString(); service.At(cron).Run <MyJob>(); }
public SpecialityController(ISpecialityService specialityService, IRoomService roomService, IDoctorBasicService doctorService, ISchedulingService schedulingService, ISpecialityDoctorService specialityDoctorService, UserManager <MyUser> userManager) { _specialityService = specialityService; _roomService = roomService; _doctorService = doctorService; _schedulingService = schedulingService; _specialityDoctorService = specialityDoctorService; _userManager = userManager; }
public AddOpponentPopupViewModel( IValidationObjectFactory validationObjectFactory, ISchedulingService schedulingService) { _validationObjectFactory = validationObjectFactory; _schedulingService = schedulingService; ResetValidationObjects(); }
public SchedulingController(UserManager <MyUser> userManager, ISchedulingService schedulingService, IBlockService blockService, ITicketService ticketService, IRoomService roomService, IDoctorBasicService doctorService, IMailService emailService) { _userManager = userManager; _schedulingService = schedulingService; _blockService = blockService; _ticketService = ticketService; _roomService = roomService; _doctorService = doctorService; _emailService = emailService; }
public void Initialize() { BaseSqlTest.SeedDatabase(); _repository = new SchedulingSqlRepository(); _service = new SchedulingService(_repository); _employee = ObjectMother.GetEmployee(); _employee.Id = 1; _room = ObjectMother.GetRoom(); _room.Id = 1; }
public SteamGameServerService( MonkeyDBContext dbContext, DiscordClient discordClient, ISchedulingService schedulingService, ILogger <SteamGameServerService> logger) : base(GameServerType.Steam, dbContext, discordClient, schedulingService, logger) { _dbContext = dbContext; _discordClient = discordClient; _logger = logger; }
public MineCraftGameServerService( MonkeyDBContext dbContext, DiscordClient discordClient, ISchedulingService schedulingService, ILogger <MineCraftGameServerService> logger) : base(GameServerType.Minecraft, dbContext, discordClient, schedulingService, logger) { _dbContext = dbContext; _discordClient = discordClient; _logger = logger; }
/// <summary> /// Kicks off the running of the schedule monitor. /// </summary> /// <param name="service">The schedulign service to use.</param> public void AddToScheduler(ISchedulingService service) { var jobName = typeof(SystemMonitor).Name; if (!service.HasJob(jobName)) { service.AddJob( typeof(SystemMonitor).Name, ConfigurationManager.AppSettings[Constants.MonitorSchedule], () => { RecordPerformance(); }); } }
public SchedulingController(INotifier notifier, ISchedulingService schedulingService, IDentistService dentistService, IPatientService patientService, UserManager <IdentityUser> userManager) : base(notifier) { _schedulingService = schedulingService; _dentistService = dentistService; _patientService = patientService; _userManager = userManager; }
/// <summary> /// Start waiting for a valid handshake. /// </summary> internal override void StartWaitForHandshake() { _lock.AcquireWriterLock(); try { if (FluorineConfiguration.Instance.FluorineSettings.RtmpServer.RtmpConnectionSettings.MaxHandshakeTimeout > 0) { ISchedulingService schedulingService = _endpoint.GetMessageBroker().GlobalScope.GetService(typeof(ISchedulingService)) as ISchedulingService; _waitForHandshakeJob = schedulingService.AddScheduledOnceJob(FluorineConfiguration.Instance.FluorineSettings.RtmpServer.RtmpConnectionSettings.MaxHandshakeTimeout, new WaitForHandshakeJob(this)); } } finally { _lock.ReleaseWriterLock(); } }
public InfluxDbUpload(ILogger logger, InfluxDBClient client, IThreadManager threadManager, ISchedulingService schedulingService) { _logger = logger; _client = client; _threadManager = threadManager; _schedulingService = schedulingService; _jobQueue = new BlockingCollection <InfluxDbUploadQueueElement>(); _retryJobQueue = new List <InfluxDbUploadRetryQueueElement>(); }
public PatientController(IIdentityProvider identityProvider, IPatientRepository patientRepository, IAppointmentRepository appointmentRepository, IPatientManagementService patientManagementService, IVisitationManagementService visitationManagementService, ISchedulingService schedulingService) { _identityProvider = identityProvider; _patientRepository = patientRepository; _appointmentRepository = appointmentRepository; _patientManagementService = patientManagementService; _visitationManagementService = visitationManagementService; _schedulingService = schedulingService; }
public SceneViewUpdateScheduleTask(ISchedulingService scheduleManager, bool early) { this.workItems = new Dictionary <SceneViewModel, SceneUpdatePhaseEventArgs>(); if (early) { this.priority = SceneViewUpdateScheduleTask.earlyPriority; this.task = scheduleManager.RegisterTask("EarlySceneUpdatePhase", this.priority, new ScheduleTask.NoArgumentsReturningVoid(this.UpdateEarly), (string[])null); } else { this.priority = SceneViewUpdateScheduleTask.latePriority; this.task = scheduleManager.RegisterTask("LateSceneUpdatePhase", this.priority, new ScheduleTask.NoArgumentsReturningVoid(this.UpdateLate), (string[])null); } }
public DoctorController(IIdentityProvider identityProvider, IDoctorRepository doctorRepository, IAppointmentRepository appointmentRepository, IPatientRepository patientRepository, IPatientManagementService patientManagementService, IVisitationManagementService visitationManagementService, ISchedulingService schedulingService, IReferralRepository referralRepository, INotificationManagementService notificationManagementService) { _identityProvider = identityProvider; _doctorRepository = doctorRepository; _appointmentRepository = appointmentRepository; _patientRepository = patientRepository; _patientManagementService = patientManagementService; _visitationManagementService = visitationManagementService; _schedulingService = schedulingService; _referralRepository = referralRepository; _notificationManagementService = notificationManagementService; }
public LegalController(IPatientRepository patientRepository, IIdentityProvider identityProvider, ISchedulingService schedulingService, IAppointmentRepository appointmentRepository, IDoctorRepository doctorRepository, IPatientManagementService patientManagementService, IVisitationManagementService visitationManagementService, IAccountRepository accountRepository, IAccountManagementService accountManagementService) { _patientRepository = patientRepository; _identityProvider = identityProvider; _schedulingService = schedulingService; _appointmentRepository = appointmentRepository; _doctorRepository = doctorRepository; _patientManagementService = patientManagementService; _accountManagementService = accountManagementService; _accountRepository = accountRepository; _visitationManagementService = visitationManagementService; }
public static string GetSummary(this ISchedulingService schedulingService) { Argument.IsNotNull(() => schedulingService); #pragma warning disable IDISP001 // Dispose created var serviceLocator = schedulingService.GetServiceLocator(); #pragma warning restore IDISP001 // Dispose created var languageService = serviceLocator.ResolveType <ILanguageService>(); var scheduledTasks = (from task in schedulingService.GetScheduledTasks() orderby task.Start select task).ToList(); var runningTasks = (from task in schedulingService.GetRunningTasks() orderby task.Started select task).ToList(); var stringBuilder = new StringBuilder(); stringBuilder.AppendLine(languageService.GetString("Scheduling_RunningTasks")); stringBuilder.AppendLine("============================="); stringBuilder.AppendLine(); foreach (var runningTask in runningTasks) { stringBuilder.AppendLine("* {0}", runningTask); } stringBuilder.AppendLine(); stringBuilder.AppendLine(languageService.GetString("Scheduling_ScheduledTasks")); stringBuilder.AppendLine("============================="); stringBuilder.AppendLine(); foreach (var scheduledTask in scheduledTasks) { stringBuilder.AppendLine("* {0}", scheduledTask); } return(stringBuilder.ToString()); }
private static void ServiceSetup(ISchedulingService schedulingService) { var taskCreator = IoC.Resolve<ITaskCreator>(); schedulingService.At("10 * * * *").Run(() => new CreateTaskJob(taskCreator)); }
internal JobPart(ISchedulingService service, ScheduledJob queueEntry) { _service = service; _queueEntry = queueEntry; }
/// <summary> /// Starts the server-side stream. /// </summary> public override void Start() { if (_state != State.UNINIT) throw new NotSupportedException("State " + _state + " not valid to start"); if (_items.Count == 0) throw new NotSupportedException("At least one item should be specified to start"); if (_publishedName == null) throw new NotSupportedException("A published name is needed to start"); // publish this server-side stream IProviderService providerService = this.Scope.GetService(typeof(IProviderService)) as IProviderService; providerService.RegisterBroadcastStream(this.Scope, _publishedName, this); _recordPipe = new InMemoryPushPushPipe(); #if !(NET_1_1) Dictionary<string, object> recordParamMap = new Dictionary<string, object>(); #else Hashtable recordParamMap = new Hashtable(); #endif recordParamMap.Add("record", null); _recordPipe.Subscribe((IProvider)this, recordParamMap); _recordingFilename = null; _schedulingService = this.Scope.GetService(typeof(ISchedulingService)) as ISchedulingService; _state = State.STOPPED; _currentItemIndex = -1; NextItem(); }
public Builder(PlaylistSubscriberStream playlistSubscriberStream, ISchedulingService schedulingService, IConsumerService consumerService, IProviderService providerService) { _playlistSubscriberStream = playlistSubscriberStream; _schedulingService = schedulingService; _consumerService = consumerService; _providerService = providerService; }
private PlayEngine(Builder builder) { _playlistSubscriberStream = builder.PlaylistSubscriberStream; _schedulingService = builder.SchedulingService; _consumerService = builder.ConsumerService; _providerService = builder.ProviderService; //_playlistSubscriberStream = stream; //_schedulingService = _playlistSubscriberStream.Scope.GetService(typeof(ISchedulingService)) as ISchedulingService; }
static void ServiceSetup(ISchedulingService service) { service.At("*/5 * * * *").Run(() => new ReceiverJob()); service.At("*/5 * * * *").Run(() => new PublisherJob()); }
/// <summary> /// Creates a play engine based on current services (scheduling service, consumer service, and provider service). /// </summary> /// <param name="schedulingService">The scheduling service.</param> /// <param name="consumerService">The consumer service.</param> /// <param name="providerService">The provider service.</param> /// <returns>Play engine.</returns> PlayEngine CreateEngine(ISchedulingService schedulingService, IConsumerService consumerService, IProviderService providerService) { _engine = new PlayEngine.Builder(this, schedulingService, consumerService, providerService).Build(); return _engine; }