示例#1
0
        public AreaService(
            IComponentService componentService,
            IAutomationService automationService,
            ISystemEventsService systemEventsService,
            ISystemInformationService systemInformationService,
            IApiService apiService,
            ISettingsService settingsService)
        {
            if (componentService == null)
            {
                throw new ArgumentNullException(nameof(componentService));
            }
            if (automationService == null)
            {
                throw new ArgumentNullException(nameof(automationService));
            }
            if (systemEventsService == null)
            {
                throw new ArgumentNullException(nameof(systemEventsService));
            }
            if (systemInformationService == null)
            {
                throw new ArgumentNullException(nameof(systemInformationService));
            }
            if (apiService == null)
            {
                throw new ArgumentNullException(nameof(apiService));
            }
            if (settingsService == null)
            {
                throw new ArgumentNullException(nameof(settingsService));
            }

            _componentService  = componentService;
            _automationService = automationService;
            _apiService        = apiService;
            _settingsService   = settingsService;

            systemEventsService.StartupCompleted += (s, e) =>
            {
                systemInformationService.Set("Areas/Count", _areas.GetAll().Count);
            };

            apiService.ConfigurationRequested += HandleApiConfigurationRequest;
        }
示例#2
0
        public MasterDataModel GetMasterData()
        {
            MasterDataModel model = new MasterDataModel();

            model.Universes = UniverseCollection.GetAll();
            model.Worlds    = WorldCollection.GetAll();
            model.Areas     = AreaCollection.GetAll();
            model.Sections  = SectionCollection.Bundle;
            return(model);
        }
 public IList <IArea> Areas()
 {
     return(_areas.GetAll());
 }
示例#4
0
 public List <AreaData> GetAllAreas()
 {
     return(AreaCollection.GetAll());
 }