mirror of
https://github.com/Tribufu/TribufuDotNet
synced 2026-08-08 12:21:07 +00:00
Migrate to new tribufu project structure (#2)
* Migrate to new tribufu project structure * Update .gitignore * Remove old api files * Update Directory.Build.props * Rename solution
This commit is contained in:
parent
be25ee8fe3
commit
7e8e192dc3
115 changed files with 41 additions and 262 deletions
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Tribufu.Serialization
|
||||
{
|
||||
public class BaseClassFirstContractResolver : DefaultContractResolver
|
||||
{
|
||||
protected override IList<JsonProperty> CreateProperties(Type type, MemberSerialization memberSerialization)
|
||||
{
|
||||
var props = base.CreateProperties(type, memberSerialization);
|
||||
return props.OrderBy(p => { return p.DeclaringType == type ? 1 : 0; }).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue