Пример #1
0
        public ExportingMember(ExportDefinition definition, ReflectionMember member)
        {
            Assumes.NotNull(definition, member);

            _definition = definition;
            _member     = member;
        }
        public ExportingMember(ExportDefinition definition, ReflectionMember member)
        {
            Assumes.NotNull(definition, member);

            this._definition = definition;
            this._member = member;
        }
Пример #3
0
        public ExportingMember(ExportDefinition definition, ReflectionMember member)
        {
            ArgumentNullException.ThrowIfNull(definition);
            ArgumentNullException.ThrowIfNull(member);

            _definition = definition;
            _member     = member;
        }
Пример #4
0
        public ExportingMember(ExportDefinition definition, ReflectionMember member)
        {
            if (definition == null)
            {
                throw new ArgumentNullException(nameof(definition));
            }

            if (member == null)
            {
                throw new ArgumentNullException(nameof(member));
            }

            _definition = definition;
            _member     = member;
        }
        public static LazyMemberInfo ToLazyMember(this ReflectionMember reflectionMember)
        {
            Assumes.NotNull(reflectionMember);

            if (reflectionMember.ItemType == ReflectionItemType.Property)
            {
                ReflectionProperty reflectionProperty = reflectionMember as ReflectionProperty;
                Assumes.NotNull(reflectionProperty);

                MemberInfo[] accessors = new MemberInfo[] { reflectionProperty.UnderlyingGetMethod, reflectionProperty.UnderlyingSetMethod };
                return(new LazyMemberInfo(MemberTypes.Property, accessors));
            }
            else
            {
                return(new LazyMemberInfo(reflectionMember.UnderlyingMember.MemberType, reflectionMember.UnderlyingMember));
            }
        }