コード例 #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
        protected override T SelectOverride(EditorCollection <T> editors, PropertyInfo property)
        {
            var match = editors.FirstOrDefault(x => HasSameTypeAndName(property, x));

            return(match?.Template);
        }
コード例 #3
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);
        }