Beispiel #1
0
 private static void ProcessAttributes(ref PropertyMetadata p_data, MemberInfo m_info)
 {
     foreach (Attribute attr in m_info.GetCustomAttributes(true))
     {
         if (attr is JsonIgnore)
         {
             JsonIgnore ignore_attr = (JsonIgnore)attr;
             p_data.Ignore = ignore_attr.Usage;
         }
     }
 }
Beispiel #2
0
 private static void ProcessAttributes(ref PropertyMetadata p_data, MemberInfo m_info)
 {
     object[] customAttributes = m_info.GetCustomAttributes(inherit: true);
     for (int i = 0; i < customAttributes.Length; i++)
     {
         Attribute attribute = (Attribute)customAttributes[i];
         if (attribute is JsonIgnore)
         {
             JsonIgnore jsonIgnore = (JsonIgnore)attribute;
             p_data.Ignore = jsonIgnore.Usage;
         }
     }
 }