コード例 #1
0
        public static void Map(this JsonMapBase jsonMap, LambdaExpression expr, string name)
        {
            MemberInfo memberInfo = GetMemberInfoFromExpression(expr);

            jsonMap.Actions.Add(
                (member, property, mode) =>
            {
                if (TypeExtraInfo.MembersAreTheSame(member, memberInfo))
                {
                    property.PropertyName    = name;
                    property.ShouldSerialize = instance => true;
                }
            });
        }
コード例 #2
0
 public virtual bool AcceptsMember(MemberInfo member, MemberInfo memberInfo)
 {
     return(TypeExtraInfo.MembersAreTheSame(member, memberInfo));
 }