private void AddReverse(ConfiguredDataSourceFactory dataSourceFactory, bool isAutoReversal) { var reverseDataSourceFactory = dataSourceFactory.CreateReverseIfAppropriate(isAutoReversal); if (reverseDataSourceFactory != null) { DataSourceFactories.AddOrReplaceThenSort(reverseDataSourceFactory); } }
public string GetConflictMessage(ConfiguredDataSourceFactory conflictingDataSource) { if (HasMemberFilter) { return($"Member ignore pattern '{TargetMemberFilter}' conflicts with a configured data source"); } return($"Ignored member {TargetMember.GetPath()} has a configured data source"); }
public void Add(ConfiguredDataSourceFactory dataSourceFactory) { ThrowIfConflictingIgnoredMemberExists( dataSourceFactory, dsf => "Member " + dsf.TargetMember.GetPath() + " has been ignored"); ThrowIfConflictingDataSourceExists( dataSourceFactory, dsf => dsf.TargetMember.GetPath() + " already has a configured data source"); _dataSourceFactories.Add(dataSourceFactory); }
public void Add(ConfiguredDataSourceFactory dataSourceFactory) { if (!dataSourceFactory.TargetMember.IsRoot) { ThrowIfConflictingIgnoredMemberExists(dataSourceFactory); ThrowIfConflictingDataSourceExists(dataSourceFactory, (dsf, cDsf) => dsf.GetConflictMessage(cDsf)); } DataSourceFactories.AddSortFilter(dataSourceFactory); if (!HasConfiguredRootDataSources && dataSourceFactory.TargetMember.IsRoot) { HasConfiguredRootDataSources = true; } }
public void Add(ConfiguredDataSourceFactory dataSourceFactory) { if (!dataSourceFactory.TargetMember.IsRoot) { ThrowIfConflictingIgnoredMemberExists(dataSourceFactory); ThrowIfConflictingDataSourceExists(dataSourceFactory, (dsf, cDsf) => dsf.GetConflictMessage(cDsf)); } DataSourceFactories.AddOrReplaceThenSort(dataSourceFactory); if (dataSourceFactory.TargetMember.IsRoot) { HasConfiguredToTargetDataSources = true; return; } if (AutoDataSourceReversalEnabled(dataSourceFactory)) { AddReverse(dataSourceFactory, isAutoReversal: true); } }
public abstract string GetConflictMessage(ConfiguredDataSourceFactory conflictingDataSource);
public override string GetConflictMessage(ConfiguredDataSourceFactory conflictingDataSource) => $"Member ignore pattern '{TargetMemberFilter}' conflicts with a configured data source";
public bool AutoDataSourceReversalEnabled(ConfiguredDataSourceFactory dataSourceFactory) => AutoDataSourceReversalEnabled(dataSourceFactory, dsf => dsf.ConfigInfo.ToMapperData(dsf.TargetMember));
public void AddReverseDataSourceFor(ConfiguredDataSourceFactory dataSourceFactory) => AddReverse(dataSourceFactory, isAutoReversal: false);
private static string GetConflictMessage( CustomDictionaryKey key, ConfiguredDataSourceFactory conflictingDataSource) { return(key.GetConflictMessage(conflictingDataSource)); }
public override string GetConflictMessage(ConfiguredDataSourceFactory conflictingDataSource) => $"Ignored member {TargetMember.GetPath()} has a configured data source";
public string GetConflictMessage(ConfiguredDataSourceFactory conflictingDataSource) => $"Configured dictionary key member {TargetMember.GetPath()} has a configured data source";