Equivalent to AutoMapper 3.3.1's ResolutionContext.MemberName

45 views
Skip to first unread message

matt...@gmail.com

unread,
Oct 17, 2016, 5:55:54 PM10/17/16
to AutoMapper-users
Hello,

We are attempting to upgrade from AutoMapper 3.3.1 to 5.1.1. One of the final hurdles is finding the equivalent to ResolutionContext.Member

Here's a snippet of code for context:

internal static void ApplyFieldsCondition<TSourceTDestinationTMember>(IMemberConfigurationExpression<TSourceTDestinationTMember> opt)
{
    opt.Condition(new Func<ResolutionContextbool>(context =>
    {
        if (AlwaysIncludedFields.Contains(context.MemberName))
            return true;
 
        return ((WebRequestParameters) context.Options.Items[RequestParametersKey]).ContainsField(context.MemberName);
    }));
}

Thanks,
Matt

Jimmy Bogard

unread,
Oct 21, 2016, 9:39:09 AM10/21/16
to automapper-users
Ohhhh that one is new. Can you open a GitHub issue?

--
You received this message because you are subscribed to the Google Groups "AutoMapper-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to automapper-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Zinkevicius

unread,
Oct 21, 2016, 12:44:40 PM10/21/16
to automapp...@googlegroups.com

--
You received this message because you are subscribed to a topic in the Google Groups "AutoMapper-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/automapper-users/zVtaE0rPBPQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to automapper-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages