Orchard.Forms.Services.DescribeContext.Describe C# (CSharp) Method

Describe() public method

public Describe ( ) : IList
return IList
        public IList<FormDescriptor> Describe() {
            return _descriptors.Select(x => x.Value).ToList();
        }

Usage Example

        public dynamic Build(string formName, string prefix = "")
        {
            var context = new DescribeContext();

            foreach (var provider in _formProviders)
            {
                provider.Describe(context);
            }

            var descriptor = context.Describe().FirstOrDefault(x => x.Name == formName);

            if (descriptor == null)
            {
                return(null);
            }

            var shape           = descriptor.Shape(_shapeFactory);
            var buildingContext = new BuildingContext {
                Shape = shape
            };

            _formEventHandlers.Invoke(dispatch => dispatch.Building(buildingContext), Logger);
            // alter the shapes tree (validation, ajax, ...));
            _formEventHandlers.Invoke(dispatch => dispatch.Built(buildingContext), Logger);

            return(shape);
        }
All Usage Examples Of Orchard.Forms.Services.DescribeContext::Describe
DescribeContext