Newtonsoft.Json.Serialization.DefaultContractResolver.ShouldSerializeEntityMember C# (CSharp) Method

ShouldSerializeEntityMember() private method

private ShouldSerializeEntityMember ( MemberInfo memberInfo ) : bool
memberInfo System.Reflection.MemberInfo
return bool
    private bool ShouldSerializeEntityMember(MemberInfo memberInfo)
    {
      PropertyInfo propertyInfo = memberInfo as PropertyInfo;
      if (propertyInfo != null)
      {
        if (propertyInfo.PropertyType.IsGenericType && propertyInfo.PropertyType.GetGenericTypeDefinition().FullName == "System.Data.Objects.DataClasses.EntityReference`1")
          return false;
      }

      return true;
    }
#endif