コード例 #1
0
 public IMappingConfigContinuation <TSource, TTarget> IgnoreSources(
     Expression <Func <SourceValueFilterSpecifier, bool> > valuesFilter)
 {
     return(FilterMembers(
                ConfiguredSourceValueFilter.Create(ConfigInfo, valuesFilter),
                UserConfigurations.Add));
 }
コード例 #2
0
        public void Add(ConfiguredSourceValueFilter sourceValueFilter)
        {
            ThrowIfConflictingItemExists(
                sourceValueFilter,
                _sourceValueFilters,
                (svf, _) => svf.GetConflictMessage());

            SourceValueFilters.AddOrReplaceThenSort(sourceValueFilter);
        }
コード例 #3
0
 /// <summary>
 /// Ignore all source members with a value matching the <paramref name="valuesFilter"/>. Matching
 /// members will not be used to populate target members in mappings between all types and
 /// mapping rule sets (create new, overwrite, etc).
 /// </summary>
 /// <param name="valuesFilter">
 /// The matching function with which to test source values to determine if they should be
 /// ignored.
 /// </param>
 /// <returns>
 /// This <see cref="IGlobalMappingSettings"/>, with which to globally configure other mapping
 /// aspects.
 /// </returns>
 public IGlobalMappingSettings IgnoreSources(Expression <Func <SourceValueFilterSpecifier, bool> > valuesFilter)
 {
     UserConfigurations.Add(ConfiguredSourceValueFilter.Create(GlobalConfigInfo, valuesFilter));
     return(this);
 }