Пример #1
0
        public OrganizationActor(IRefreshInformation refreshInformation)
        {
            this.employeesActor   = Context.ActorOf(EmployeesActor.GetProps(), "employees");
            this.departmentsActor = Context.ActorOf(DepartmentsActor.GetProps(this.employeesActor), "departments");

            Context.System.Scheduler.ScheduleTellRepeatedly(
                TimeSpan.Zero,
                TimeSpan.FromMinutes(refreshInformation.IntervalInMinutes),
                this.Self,
                RefreshOrganizationInformation.Instance,
                this.Self);
        }
Пример #2
0
        public OrganizationActor(
            IRefreshInformation refreshInformation,
            IEmployeeVacationsRegistryPropsFactory employeeVacationsRegistryPropsFactory,
            IEmployeeSickLeavesRegistryPropsFactory employeeSickLeavesRegistryPropsFactory,
            AppSettings appSettings)
        {
            this.employeesActor = Context.ActorOf(
                EmployeesActor.GetProps(employeeVacationsRegistryPropsFactory, employeeSickLeavesRegistryPropsFactory),
                "employees");
            this.departmentsActor = Context.ActorOf(
                DepartmentsActor.GetProps(this.employeesActor, appSettings.DepartmentFeatures),
                "departments");

            Context.System.Scheduler.ScheduleTellRepeatedly(
                TimeSpan.Zero,
                TimeSpan.FromMinutes(refreshInformation.IntervalInMinutes),
                this.Self,
                RefreshOrganizationInformation.Instance,
                this.Self);
        }