IList <IServiceInput> InputsFromModel() { var dt = new List <IServiceInput>(); var s = InputArea.QueryString; var postValue = InputArea.PostData; _builder.GetValue(s, dt); _builder.GetValue(postValue, dt); foreach (var nameValue in InputArea.Headers) { _builder.GetValue(nameValue.Name, dt); _builder.GetValue(nameValue.Value, dt); } return(dt); }
public IPluginService ToModel() { var pluginServiceDefinition = new PluginServiceDefinition { Source = SourceRegion.SelectedSource, Constructor = ConstructorRegion.SelectedConstructor, Namespace = NamespaceRegion.SelectedNamespace, Actions = GetActionsToRun() }; var dt = new List <IServiceInput>(); foreach (var serviceInput in InputArea.Inputs) { _builder = _builder ?? new ServiceInputBuilder(); _builder.GetValue(serviceInput.Value, dt); } return(pluginServiceDefinition); }
public IComPluginService ToModel() { var pluginServiceDefinition = new ComPluginServiceDefinition { Source = SourceRegion.SelectedSource, Action = ActionRegion.SelectedAction, Inputs = new List <IServiceInput>() }; var dt = new List <IServiceInput>(); foreach (var serviceInput in InputArea.Inputs) { _builder = _builder ?? new ServiceInputBuilder(); _builder.GetValue(serviceInput.Value, dt); pluginServiceDefinition.Inputs.Add(new ServiceInput(serviceInput.Name, serviceInput.Value) { TypeName = serviceInput.TypeName }); } return(pluginServiceDefinition); }
public void TestProcedure() { var service = ToModel(); if (!string.IsNullOrEmpty(CommandText)) { var builder = new ServiceInputBuilder(); var serviceInputs = new List <IServiceInput>(); builder.GetValue(CommandText, serviceInputs); service.Inputs = serviceInputs; ManageServiceInputViewModel.InputArea.Inputs = service.Inputs; ManageServiceInputViewModel.Model = service; ManageServiceInputViewModel.OutputCountExpandAllowed = true; GenerateOutputsVisible = true; SetDisplayName(OutputDisplayName); } else { ErrorMessage(new Exception("Action cannot be empty"), true); } }