Пример #1
0
        public void Add(ConfiguredDataSourceFactoryBase dataSourceFactory)
        {
            if (!dataSourceFactory.TargetMember.IsRoot)
            {
                ThrowIfConflictingIgnoredSourceMemberExists(dataSourceFactory, (dsf, cIsm) => cIsm.GetConflictMessage(dsf));
                ThrowIfConflictingIgnoredMemberExists(dataSourceFactory);
            }

            ThrowIfConflictingDataSourceExists(dataSourceFactory, (dsf, cDsf) => dsf.GetConflictMessage(cDsf));

            DataSourceFactories.AddOrReplaceThenSort(dataSourceFactory);

            if (dataSourceFactory.TargetMember.IsRoot)
            {
                HasToTargetDataSources = true;
                return;
            }

            if (dataSourceFactory is IReversibleConfiguredDataSourceFactory reversibleDataSourceFactory &&
                AutoDataSourceReversalEnabled(reversibleDataSourceFactory))
            {
                AddReverse(reversibleDataSourceFactory, isAutoReversal: true);
            }
        }
Пример #2
0
 public string GetConflictMessage(ConfiguredDataSourceFactoryBase conflictingDataSource)
 => $"Configured dictionary key member {TargetMember.GetPath()} has a configured data source";
 public abstract string GetConflictMessage(ConfiguredDataSourceFactoryBase conflictingDataSource);
 public override string GetConflictMessage(ConfiguredDataSourceFactoryBase conflictingDataSource)
 {
     return($"Configured data source {conflictingDataSource.GetDescription()} " +
            "conflicts with an ignored member");
 }
Пример #5
0
 public override string GetConflictMessage(ConfiguredDataSourceFactoryBase conflictingDataSource)
 {
     return($"Configured data source {conflictingDataSource.GetDescription()} " +
            $"conflicts with source member ignore pattern '{SourceMemberFilter}'");
 }
 private static string GetConflictMessage(
     CustomDictionaryKey key,
     ConfiguredDataSourceFactoryBase conflictingDataSource)
 {
     return(key.GetConflictMessage(conflictingDataSource));
 }