private static bool MembersHaveCompatibleTypes(IMemberMapperData rootMapperData, Member sourceMember)
        {
            if (!sourceMember.IsSimple)
            {
                return(true);
            }

            return(rootMapperData.TargetMember.IsSimple ||
                   rootMapperData.TargetMember.Type == typeof(object));
        }
 private static bool MembersAreTheSame(IMemberMapperData mapperData, Member sourceMember)
 => mapperData.TargetMember.LeafMember.Equals(sourceMember);
Exemplo n.º 3
0
 public bool Equals(Member otherMember) => otherMember?._hashCode == _hashCode;
Exemplo n.º 4
0
 public string[] GetMatchingNamesFor(Member member) => EnumerateMatchingNames(member).ToArray();
Exemplo n.º 5
0
 private static string GetIdentifierName(Member member)
 {
     return(member.Name.EndsWith("Identifier", StringComparison.Ordinal)
         ? member.Name.Substring(0, member.Name.Length - 8)
         : null);
 }
Exemplo n.º 6
0
        private static QualifiedMember GetNonEnumerableChildMember(QualifiedMember parentMember, Member childMember)
        {
            var qualifiedChildMember = parentMember.Append(childMember);

            if (qualifiedChildMember.IsEnumerable)
            {
                qualifiedChildMember = qualifiedChildMember.GetElementMember();
            }

            return(qualifiedChildMember);
        }
 public IQualifiedMember Append(Member childMember) => new DictionaryEntrySourceMember(this, childMember);