15 changed files with 79 additions and 46 deletions
@ -0,0 +1,25 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Newtonsoft.Json.Serialization; |
||||
|
using Newtonsoft.Json; |
||||
|
using System.Reflection; |
||||
|
|
||||
|
namespace AMESCoreStudio.WebApi |
||||
|
{ |
||||
|
public class CustomContractResolver : DefaultContractResolver |
||||
|
{ |
||||
|
public static CustomContractResolver Instance { get; } = new CustomContractResolver(); |
||||
|
|
||||
|
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization) |
||||
|
{ |
||||
|
JsonProperty property = base.CreateProperty(member, memberSerialization); |
||||
|
if (member.Name == "LazyLoader") |
||||
|
{ |
||||
|
property.Ignored = true; |
||||
|
} |
||||
|
return property; |
||||
|
} |
||||
|
} |
||||
|
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Loading…
Reference in new issue