public override IEnumerable<TemplateViewModel> TypePartEditorUpdate(ContentTypePartDefinitionBuilder builder, IUpdateModel updateModel) {
            if (builder.Name != "MessageTemplatePart")
                yield break;

            var model = new MessageTemplatePartSettings();

            if (updateModel.TryUpdateModel(model, "MessageTemplatePartSettings", null, null)) {
                builder.WithSetting("MessageTemplatePartSettings.DefaultParserId", model.DefaultParserId);

                yield return DefinitionTemplate(model);
            }
        }
Ejemplo n.º 2
0
        public override IEnumerable <TemplateViewModel> TypePartEditorUpdate(ContentTypePartDefinitionBuilder builder, IUpdateModel updateModel)
        {
            if (builder.Name != "MessageTemplatePart")
            {
                yield break;
            }

            var model = new MessageTemplatePartSettings();

            if (updateModel.TryUpdateModel(model, "MessageTemplatePartSettings", null, null))
            {
                builder.WithSetting("MessageTemplatePartSettings.DefaultParserId", model.DefaultParserId);

                yield return(DefinitionTemplate(model));
            }
        }