Beispiel #1
0
 private IReadOnlyDictionary <string, object> MapIdentityValues(IEnumerable <string> identitySearchTerms)
 {
     try
     {
         return(_displayNameToAliasValueConverter.Map(identitySearchTerms));
     }
     catch (Exception e)
     {
         throw new AttributeMapException("Unable to map identity values.", e);
     }
 }
Beispiel #2
0
        /// <summary>
        ///     Visits the <see cref="T:System.Linq.Expressions.ConstantExpression" />.
        /// </summary>
        /// <param name="node">The expression to visit.</param>
        /// <returns>The modified expression, if it or any subexpression was modified; otherwise, returns the original expression.</returns>
        protected override Expression VisitConstant(ConstantExpression node)
        {
            if (!NeedsIdentityMapping)
            {
                return(base.VisitConstant(node));
            }

            var newNode = _valueConverter.Map(node.Value as string);

            return(Expression.Constant(newNode));
        }