public AddMethodForm(SchemaObject schemaObject) { InitializeComponent(); this.schemaObject = schemaObject; schemaMethod = new SchemaObject.SchemaMethod(); PopulateListOfMethodTypes(); PopulateListOfProperties(); }
public AddMethodForm(SchemaObject schemaObject, SchemaObject.SchemaMethod schemaMethod) { InitializeComponent(); this.schemaObject = schemaObject; this.schemaMethod = schemaMethod; PopulateListOfProperties(); PopulateListOfMethodTypes(); txtName.Text = schemaMethod.Name; txtDescription.Text = schemaMethod.Description; txtDisplayName.Text = schemaMethod.DisplayName; cmbType.SelectedItem = schemaMethod.K2Type.ToString(); }
public List <SchemaMethodProperty> GetMethodProperties(SchemaObject.SchemaMethod schemaMethod) { List <SchemaMethodProperty> properties = new List <SchemaMethodProperty>(); foreach (SchemaProperty p in schemaProperties) { SchemaMethodProperty methodProps = new SchemaMethodProperty(); methodProps.Property = p.Name; //Loop through inputs for method foreach (string property in schemaMethod.InputProperties) { if (property == p.Name) { methodProps.Input = true; } } //loop thorugh requireds for method foreach (string property in schemaMethod.RequiredProperties) { if (property == p.Name) { methodProps.Required = true; } } //loop through returns for method foreach (string property in schemaMethod.ReturnProperties) { if (property == p.Name) { methodProps.Return = true; } } properties.Add(methodProps); } return(properties); }