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

            var settings = new BidsPartSettings {
            };

            if (updateModel.TryUpdateModel(settings, "BidsPartSettings", null, null)) {
                builder.WithSetting("BidsPartSettings.DefaultBidsShown", settings.DefaultBidsShown.ToString(CultureInfo.InvariantCulture));
                builder.WithSetting("BidsPartSettings.MustBeAuthenticated", settings.MustBeAuthenticated.ToString(CultureInfo.InvariantCulture));
            }

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

            var settings = new BidsPartSettings {
            };

            if (updateModel.TryUpdateModel(settings, "BidsPartSettings", null, null))
            {
                builder.WithSetting("BidsPartSettings.DefaultBidsShown", settings.DefaultBidsShown.ToString(CultureInfo.InvariantCulture));
                builder.WithSetting("BidsPartSettings.MustBeAuthenticated", settings.MustBeAuthenticated.ToString(CultureInfo.InvariantCulture));
            }

            yield return(DefinitionTemplate(settings));
        }