Пример #1
0
        public bool IsReadOnly(EMemberInfo member)
        {
            if (_isReadOnlyCache.ContainsKey(member))
            {
                return(_isReadOnlyCache[member]);
            }
            var isReadOnly = member.ParentType.GetCustomAttribute <ReadOnlyAttribute>() != null ||
                             member.GetCustomAttribute <ReadOnlyAttribute>() != null;

            _isReadOnlyCache[member] = isReadOnly;
            return(isReadOnly);
        }
Пример #2
0
        public bool HasLabel(EMemberInfo member)
        {
            var isReadOnly = member.GetCustomAttribute <NoLabelAttribute>() == null;

            return(isReadOnly);
        }