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;
        }
 public static void SaveSchemaXMLFile(SchemaObject schemaObject, string filePath)
 {
     if (filePath.Length == 0)
     {
         filePath = @"ServiceObjectSchema\SchemaObject.xml";
     }
     Serialization.SerializeObject(schemaObject, filePath);
 }
 public static void SaveSchemaXMLFile(SchemaObject schemaObject, string filePath)
 {
     if (filePath.Length == 0)
     {
         filePath = @"ServiceObjectSchema\SchemaObject.xml";
     }
     Serialization.SerializeObject(schemaObject, filePath);
 }
        public AddMethodForm(SchemaObject schemaObject)
        {
            InitializeComponent();
            this.schemaObject = schemaObject;
            schemaMethod = new SchemaObject.SchemaMethod();

            PopulateListOfMethodTypes();
            PopulateListOfProperties();
        }
        public static SchemaObject LoadSchemaXMLFile(string filePath)
        {
            if (filePath.Length == 0)
            {
                filePath = @"ServiceObjectSchema\SchemaObject.xml";
            }
            SchemaObject schemaObject = (SchemaObject)Serialization.DeserializeObject(filePath, typeof(SchemaObject));

            return(schemaObject);
        }
 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 ServiceSchemaConfigurator()
 {
     InitializeComponent();
     schemaObject = new SchemaObject();
 }
 private void loadSchemaToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (openFileDialogSchema.ShowDialog() == DialogResult.OK)
     {
         schemaObject = SchemaManager.LoadSchemaXMLFile(openFileDialogSchema.FileName);
         updateGrids();
     } 
 }