Пример #1
0
        protected override T SelectOverride(EditorCollection <T> editors, PropertyInfo property)
        {
            if (property.PropertyType.IsEnum)
            {
                return(editors.FirstOrDefault(x => x.Key.TargetType == typeof(Enum))?.Template);
            }

            return(default);
Пример #2
0
        public T Select(EditorCollection <T> editors, PropertyInfo property)
        {
            var selected = SelectOverride(editors, property);

            if (selected != null)
            {
                return(selected);
            }

            return(Next?.Select(editors, property));
        }
Пример #3
0
        protected override T SelectOverride(EditorCollection <T> editors, PropertyInfo property)
        {
            var match = editors.FirstOrDefault(x => HasSameTypeAndName(property, x));

            return(match?.Template);
        }
Пример #4
0
 protected override T SelectOverride(EditorCollection <T> editors, PropertyInfo property)
 {
     return(getTemplate());
 }
Пример #5
0
        protected override T SelectOverride(EditorCollection <T> editors, PropertyInfo property)
        {
            var editorKey = editors.FirstOrDefault(x => x.Key.TargetType == property.PropertyType && !x.Key.Properties.Any());

            return(editorKey?.Template);
        }
Пример #6
0
 protected abstract T SelectOverride(EditorCollection <T> editors, PropertyInfo property);