Skip to content

Instantly share code, notes, and snippets.

@sitefinitySDK
Created November 17, 2020 00:07
SF_13.2, SF_13.3, SF_14.0, SF_14.1, SF_14.2, SF_14.3 - https://www.progress.com/documentation/sitefinity-cms/autogenerated-field-types/
using System.ComponentModel;
using Progress.Sitefinity.Renderer.Entities.Content;
using Progress.Sitefinity.Renderer.Designers.Attributes;
namespace SitefinityWebApp
{
public class DemoComplexObjects
{
public ComplexObject Complex { get; set; }
public MultiLevelComplexObject MultiLevelComplexObject { get; set; }
public IList<string> List { get; set; }
public IList<ComplexObject> ListComplexObject { get; set; }
public IList<ComplexObjectNoDefaults> ListComplexObjectNoDefaults { get; set; }
}
public class ComplexObject
{
[DisplayName("String prop")]
[DefaultValue("test")]
public string ChildString { get; set; }
[DisplayName("Int prop")]
[DefaultValue(42)]
public int ChildInt { get; set; }
}
public class ComplexObjectNoDefaults
{
[DisplayName("Boolean prop")]
public bool BoolProp { get; set; }
[DisplayName("Int prop")]
public int ChildInt { get; set; }
}
public class MultiLevelComplexObject
{
[DisplayName("String prop")]
[DefaultValue("testouter")]
public string ChildString { get; set; }
[DisplayName("Child complex prop")]
public ComplexObject ChildComplexObject { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment