public ServiceConfigurationBuilder(INavigationService navigationService, IActionInvokerFactory invokerFactory) { _navigationService = navigationService; _configuration = ServiceConfiguration.CreateSilently( "My configuration name", "http://baseuri", _navigationService, invokerFactory); }
private ServiceConfiguration CreateServiceConfiguration(JObject jConfig) { var configuration = ServiceConfiguration.CreateSilently( jConfig.Get("Name"), jConfig.Get("BaseUri"), _navigationService, _invokerFactory); var actionGroups = jConfig.GetJArray("ActionGroups").Select(j => CreateActionGroup(j, configuration)); configuration.ActionGroups.AddRange(actionGroups); return(configuration); }
private static ServiceConfiguration CreateConfiguration(int i) { var configuration = ServiceConfiguration.CreateSilently( $"Service Config {i}", "http://myserviceurl:1234", NavigationService, ActionInvokerFactory); var actions = Enumerable.Range(0, 7).Select(j => CreateAction(() => configuration.BaseUri, j)); var groups = Enumerable.Range(0, 6).Select(k => CreateGroup(configuration, actions, k)); configuration.ActionGroups.AddRange(groups); return(configuration); }
private ServiceConfiguration CreateRealTestData() { var configuration = ServiceConfiguration.CreateSilently("Domoticz", "http://mediacomputer:8080", NavigationService, ActionInvokerFactory); ServiceAction[] actions = { ServiceAction.CreateSilently("On", "json.htm?type=command¶m=switchlight&idx=1&switchcmd=Set%20Level&level=15", "Get", "", "", () => configuration.BaseUri), ServiceAction.CreateSilently("Off", "json.htm?type=command¶m=switchlight&idx=1&switchcmd=Off", "Get", "", "", () => configuration.BaseUri) }; var actionGroup = ActionGroup.CreateSilently("Dining Room", configuration, NavigationService); actionGroup.Actions.AddRange(actions); ActionGroup[] groups = { actionGroup }; configuration.ActionGroups.AddRange(groups); return(configuration); }
private async void AddEmptyServiceConfiguration() { Configurations.Add(ServiceConfiguration.CreateSilently("", "", _navigationService, _invokerFactory, EditMode)); await StoreDataAsync(); }