public PatchDefinition <TSource, TTarget> Map <TField>(
            Func <TSource, TField> sourceValueSelector,
            Expression <Func <TTarget, TField> > targetSelector)
        {
            var patchOperator = new PatchOperator <TSource, TTarget>
            {
                FieldName = (targetSelector.Body as MemberExpression)?.Member.Name,
                IsEqual   = (source, target) =>
                {
                    var sourceValue = sourceValueSelector(source);
                    var targetValue = targetSelector.Compile().Invoke(target);

                    if (sourceValue == null && targetValue == null)
                    {
                        return(true);
                    }

                    if (sourceValue == null && targetValue != null || sourceValue != null && targetValue == null)
                    {
                        return(false);
                    }

                    if (sourceValue.GetType().IsArray)
                    {
                        return(ArraysEqual((sourceValue as Array), (targetValue as Array)));
                    }

                    return(sourceValue?.Equals(targetValue) ?? false);
                },
                ApplySourceValueToTarget =
                    (source, target) =>
                {
                    var value = sourceValueSelector(source);
                    var memberSelectorExpression = targetSelector.Body as MemberExpression;
                    var property = memberSelectorExpression.Member as PropertyInfo;
                    property.SetValue(target, value, null);
                }
            };

            _operators.Add(patchOperator);

            return(this);
        }
        public PatchDefinition <TSource, TTarget> Map <TField>(
            Func <TSource, TField> sourceValueSelector,
            Expression <Func <TTarget, TField> > targetSelector)
        {
            var patchOperator = new PatchOperator <TSource, TTarget>()
            {
                FieldName = (targetSelector.Body as MemberExpression)?.Member.Name,
                IsEqual   = (source, target) => sourceValueSelector(source)
                            ?.Equals(targetSelector.Compile().Invoke(target)) ?? false,
                ApplySourceValueToTarget =
                    (source, target) =>
                {
                    var value = sourceValueSelector(source);
                    var memberSelectorExpression = targetSelector.Body as MemberExpression;
                    var property = memberSelectorExpression.Member as PropertyInfo;
                    property.SetValue(target, value, null);
                }
            };

            _operators.Add(patchOperator);

            return(this);
        }