Code: Select all
 
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
    public class BinderAttribute : Attribute
    {
        /// <summary>
        /// Specifies the kind of binding to perform on the property.
        /// </summary>
        public BinderMode Mode { get; set; }
        public BinderAttribute()
        {
            Mode = BinderMode.Reference;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="BinderAttribute"/> class.
        /// </summary>
        public BinderAttribute(BinderMode mode)
        {
            Mode = mode;
        }
    }
Code: Select all
 
    public enum BinderMode
    {
        /// <summary>
        /// Bind the property as a reference to another entity.
        /// </summary>
        Reference = 1,
        /// <summary>
        /// Bind the property as a list of references to another type of entity.
        /// </summary>
        MultiReference =2,
        /// <summary>
        /// Bind the property as a contained entity, belonging to the entity to which the property belongs.
        /// </summary>
        Contained = 3
    }
What gives?