Exemplo n.º 1
0
        internal ReplaceCondition FindReplaceCondition(string propName)
        {
            if (ReplaceConditions.TryGetValue(propName, out ReplaceCondition replaceCondition))
            {
                return(replaceCondition);
            }

            return(null);
        }
Exemplo n.º 2
0
        public ScrambleMap ConditionalReplace <T>(Expression <Func <T, object> > expression, object oldValue, object newValue)
        {
            if (expression.Body is MemberExpression memberExpression)
            {
                var replaceCondition = new ReplaceCondition(oldValue, newValue);

                ReplaceConditions.Add(memberExpression.Member.Name, replaceCondition);
            }

            return(this);
        }