Ejemplo n.º 1
0
        public IEnumerable <PolymorphicCandidateDescriptor> Create()
        {
            var result = new List <PolymorphicCandidateDescriptor>();

            foreach (var form in FormProvider.GetAll())
            {
                if (ContentTypeProvider.Get(form.Type) != null)
                {
                    continue;
                }

                result.Add(new PolymorphicCandidateDescriptor(form.Id, form.Type));
            }

            return(result.AsReadOnly());
        }
Ejemplo n.º 2
0
        public void Initialize(object content, ContentTypeDescriptor contentType)
        {
            var form = FormProvider.Get(contentType.Type);

            FormInstanceInitializer.Initialize(content, form);
        }