Ejemplo n.º 1
0
        public FormProvider(IFormTypeProvider formTypeProvider, IFormCreator formCreator)
        {
            var forms = new Dictionary <Type, Form>();

            foreach (var type in formTypeProvider.GetAll())
            {
                forms[type] = formCreator.Create(type);
            }

            Forms = new ReadOnlyDictionary <Type, Form>(forms);
        }
Ejemplo n.º 2
0
 public FormFieldProvider(IFormCreator formCreator)
 {
     FormFieldsByFormId = new ReadOnlyDictionary <string, IEnumerable <FormField> >(formCreator.Create().ToDictionary(f => f.Id, f => f.Fields));
 }