Пример #1
0
        private TBuilder ForMember(Action <TMemberOptionsBuilder> memberOptions, MemberInfo member)
        {
            if (!MappedMemberInfos.ContainsKey(member))
            {
                MappedMemberInfosCount++;
                MappedMemberInfos.Add(member, MappedMemberInfosCount);
            }

            var expression = GetAndStoreExpression(member);

            memberOptions(expression);

            return((TBuilder)this);
        }
Пример #2
0
        protected virtual void SetOrderMembersAsDescribed()
        {
            if (!SetOrdinalMembersAsDescribed)
            {
                return;
            }

            foreach (var configurationExpression in ConfigurationDictionary)
            {
                if (MappedMemberInfos.ContainsKey(configurationExpression.Key))
                {
                    configurationExpression.Value.Order(MappedMemberInfos[configurationExpression.Key]);
                }
            }
        }
Пример #3
0
        protected virtual void SetIgnoredToNotMapped()
        {
            if (!IgnoredNotDescribed)
            {
                return;
            }

            foreach (var configurationExpression in ConfigurationDictionary)
            {
                if (!MappedMemberInfos.ContainsKey(configurationExpression.Key))
                {
                    configurationExpression.Value.Ignore();
                }
            }
        }