Initial commit

This commit is contained in:
GrapeshotGames 2018-12-22 10:02:57 -05:00
parent 1aecbe009b
commit a172b4ab3b
469 changed files with 119758 additions and 0 deletions

View file

@ -0,0 +1,42 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace AtlasGridDataLibrary
{
public class DeploymentAttribute : Attribute
{
}
public class DeploymentOverrideAttribute : DeploymentAttribute
{
}
public class DeploymentConstAttribute : DeploymentAttribute
{
}
public class DeploymentOverrideShouldSerializeContractResolver : DefaultContractResolver
{
//public new static readonly ShouldSerializeContractResolver Instance = new ShouldSerializeContractResolver();
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization)
{
JsonProperty property = base.CreateProperty(member, memberSerialization);
bool bShouldSersialize = member.GetCustomAttributes().OfType<DeploymentAttribute>().Any();
property.ShouldSerialize =
instance =>
{
return bShouldSersialize;
};
return property;
}
}
}