private void LoadControllerSettings() { var settings = new ControllerSettings(StoragePath.WithFilename("Configuration.json"), Logger); settings.Load(); Settings = settings; }
protected void InitializeAzureCloudApiEndpoint() { var azureCloudApiDispatcherEndpoint = new AzureCloudApiDispatcherEndpoint(); azureCloudApiDispatcherEndpoint.TryInitializeFromConfigurationFile( StoragePath.WithFilename("AzureCloudApiDispatcherEndpointSettings.json")); ApiController.RegisterEndpoint(azureCloudApiDispatcherEndpoint); }
private void LoadControllerSettings() { Settings = new SettingsContainer(StoragePath.WithFilename("Settings.json")); Settings.SetValue("Name", "HA4IoT Controller"); Settings.SetValue("Description", "The HA4IoT controller which is responsible for this house."); Settings.Load(); }
public Area(AreaId id, IController controller) { if (controller == null) { throw new ArgumentNullException(nameof(controller)); } Id = id; Controller = controller; Settings = new SettingsContainer(StoragePath.WithFilename("Areas", id.Value, "Settings.json")); GeneralSettingsWrapper = new AreaSettingsWrapper(Settings); }
private void InitializeHttpApiEndpoint() { _httpServer = new HttpServer(); var httpApiDispatcherEndpoint = new LocalHttpServerApiDispatcherEndpoint(_httpServer); ApiController.RegisterEndpoint(httpApiDispatcherEndpoint); var httpRequestDispatcher = new HttpRequestDispatcher(_httpServer); httpRequestDispatcher.MapFolder("App", StoragePath.WithFilename("App")); httpRequestDispatcher.MapFolder("Storage", StoragePath.Root); }