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;
        }
Beispiel #2
0
        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);
        }