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

            var settings = new ScriptValidationPartSettings();

            if (updateModel.TryUpdateModel(settings, "ScriptValidationPartSettings", null, null)) {
                builder.WithSetting("ScriptValidationPartSettings.Script", settings.Script);
            }

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

            var settings = new ScriptValidationPartSettings();

            if (updateModel.TryUpdateModel(settings, "ScriptValidationPartSettings", null, null))
            {
                builder.WithSetting("ScriptValidationPartSettings.Script", settings.Script);
            }

            yield return(DefinitionTemplate(settings));
        }