Exemplo n.º 1
0
        private void ProcessMemberName <T>(MemberInfo memberInfo, MemberMapping <T> memberMapping)
        {
            DataMemberAttribute?dataMemberAttribute = memberInfo.GetCustomAttribute <DataMemberAttribute>();

            if (dataMemberAttribute != null && !string.IsNullOrEmpty(dataMemberAttribute.Name))
            {
                memberMapping.SetMemberName(dataMemberAttribute.Name);
            }
        }
Exemplo n.º 2
0
        private void ProcessMemberName <T>(MemberInfo memberInfo, MemberMapping <T> memberMapping)
        {
            JsonPropertyNameAttribute?jsonPropertyNameAttribute = memberInfo.GetCustomAttribute <JsonPropertyNameAttribute>();

            if (jsonPropertyNameAttribute != null)
            {
                memberMapping.SetMemberName(jsonPropertyNameAttribute.Name);
            }
        }