public void Apply(IgnoreDictionary other) { foreach (var member in other) { this.Merge(member.Key, member.Value); } }
internal IgnoreDictionary Next(ParameterExpression source, ParameterExpression?destination, string destMemberName) { var result = new IgnoreDictionary(); foreach (var member in this) { if (!member.Key.StartsWith(destMemberName + ".")) { continue; } var next = new IgnoreItem { Condition = member.Value.IsChildPath || member.Value.Condition == null ? member.Value.Condition : Expression.Lambda(member.Value.Condition.Apply(source, destination), source, destination), IsChildPath = true }; result.Merge(member.Key.Substring(destMemberName.Length + 1), next); } return(result); }
public static IEnumerable <InvokerModel> Next(this IEnumerable <InvokerModel> resolvers, IgnoreDictionary ignore, ParameterExpression source, string destName) { return(resolvers.Where(it => !ignore.TryGetValue(it.DestinationMemberName, out var item) || item.Condition != null) .Select(it => it.Next(source, destName)) .Where(it => it != null) !); }