コード例 #1
0
        public override bool ConflictsWith(UserConfiguredItemBase otherItem)
        {
            if ((otherItem == this) ||
                ((this == CacheNone) && (otherItem == CacheAll)) ||
                ((this == CacheAll) && (otherItem == CacheNone)))
            {
                return(true);
            }

            if (base.ConflictsWith(otherItem))
            {
                var otherSettings = (MappedObjectCachingSetting)otherItem;

                if ((this == CacheNone) || (otherSettings == CacheNone) ||
                    (this == CacheAll) || (otherSettings == CacheAll))
                {
                    return(otherSettings.Cache == Cache);
                }

                // Settings have overlapping, non-global source and target types
                return(true);
            }

            return(false);
        }
コード例 #2
0
        public string GetConflictMessage(UserConfiguredItemBase conflictingConfiguredItem)
        {
            if (conflictingConfiguredItem is ConfiguredDataSourceFactory conflictingDataSource)
            {
                return(GetConflictMessage(conflictingDataSource));
            }

            return($"Member {TargetMember.GetPath()} has been ignored");
        }
コード例 #3
0
        public override bool ConflictsWith(UserConfiguredItemBase otherConfiguredItem)
        {
            if (!base.ConflictsWith(otherConfiguredItem))
            {
                return(false);
            }

            return(!WasAutoCreated ||
                   _factoryInfo.IsSameAs(((ConfiguredObjectFactory)otherConfiguredItem)._factoryInfo));
        }
コード例 #4
0
        public virtual bool ConflictsWith(UserConfiguredItemBase otherConfiguredItem)
        {
            if (HasConfiguredCondition || otherConfiguredItem.HasConfiguredCondition)
            {
                return(false);
            }

            if (ConfigInfo.HasCompatibleTypes(otherConfiguredItem.ConfigInfo))
            {
                return(TargetMember.Matches(otherConfiguredItem.TargetMember));
            }

            return(false);
        }
コード例 #5
0
        protected override bool MembersConflict(UserConfiguredItemBase otherConfiguredItem)
        {
            if (HasNoMemberFilter)
            {
                return(base.MembersConflict(otherConfiguredItem));
            }

            if ((otherConfiguredItem is ConfiguredIgnoredMember otherIgnoredMember) &&
                otherIgnoredMember.HasMemberFilter)
            {
                return(otherIgnoredMember.TargetMemberFilter == TargetMemberFilter);
            }

            return(_memberFilter.Invoke(new TargetMemberSelector(otherConfiguredItem.TargetMember)));
        }
コード例 #6
0
        public override bool ConflictsWith(UserConfiguredItemBase otherItem)
        {
            if (!base.ConflictsWith(otherItem))
            {
                return(false);
            }

            var otherSettings = (EntityKeyMappingSetting)otherItem;

            if ((this == MapAllKeys) || (otherSettings == MapAllKeys))
            {
                return(otherSettings.MapKeys == MapKeys);
            }

            // Settings have overlapping, non-global source and target types
            return(true);
        }
コード例 #7
0
        public override bool ConflictsWith(UserConfiguredItemBase otherItem)
        {
            if (base.ConflictsWith(otherItem))
            {
                var otherSettings = (DataSourceReversalSetting)otherItem;

                if ((this == ReverseAll) || (otherSettings == ReverseAll))
                {
                    return(otherSettings.Reverse == Reverse);
                }

                // Settings have overlapping, non-global source and target types
                return(true);
            }

            return(false);
        }
コード例 #8
0
        public override bool ConflictsWith(UserConfiguredItemBase otherConfiguredItem)
        {
            var otherCondition = (MapToNullCondition)otherConfiguredItem;

            return(otherCondition._targetType == _targetType);
        }
コード例 #9
0
 protected override bool HasOverlappingTypes(UserConfiguredItemBase otherConfiguredItem)
 {
     return(base.HasOverlappingTypes(otherConfiguredItem) &&
            (((ConfiguredObjectFactory)otherConfiguredItem).ObjectType == ObjectType));
 }
コード例 #10
0
 protected bool SourceAndTargetTypesAreTheSame(UserConfiguredItemBase otherConfiguredItem)
 {
     return(ConfigInfo.HasSameSourceTypeAs(otherConfiguredItem.ConfigInfo) &&
            ConfigInfo.HasSameTargetTypeAs(otherConfiguredItem.ConfigInfo));
 }
コード例 #11
0
 protected override bool HasReverseConflict(UserConfiguredItemBase otherItem) => false;
コード例 #12
0
 public bool HasSameSourceTypeAs(UserConfiguredItemBase userConfiguredItem)
 => HasSameSourceTypeAs(userConfiguredItem.ConfigInfo);
コード例 #13
0
 public bool HasSameTypesAs(UserConfiguredItemBase userConfiguredItem)
 => HasSameSourceTypeAs(userConfiguredItem) && HasSameTargetTypeAs(userConfiguredItem);
コード例 #14
0
 public bool HasSameTargetTypeAs(UserConfiguredItemBase userConfiguredItem)
 => TargetType == userConfiguredItem.TargetType;