Skip to content

Commit

Permalink
version bump for nuget
Browse files Browse the repository at this point in the history
  • Loading branch information
rikimaru0345 committed Aug 23, 2019
1 parent 3696f82 commit 1eb2312
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
17 changes: 7 additions & 10 deletions samples/LiveTesting/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,13 @@ static unsafe void Main(string[] args)
var config = new SerializerConfig();

config.Advanced.ReadonlyFieldHandling = ReadonlyFieldHandling.ForcedOverwrite;
config.OnConfigNewType = typeConfig =>
{
if (typeConfig.Type == typeof(CustomProperty))
{
typeConfig.TypeConstruction = TypeConstruction.ByUninitialized();
foreach(var m in typeConfig.UnsafeGetAllMembersIncludingCompilerGenerated())
if(m.IsCompilerGenerated && m.Member is FieldInfo f)
m.SetIncludeWithReason(SerializationOverride.ForceInclude, "want to include backing field");
}
};
config.Advanced.SkipCompilerGeneratedFields = false;
config.DefaultTargets = TargetMember.PrivateFields;

// Next two lines do exactly the same
config.ConfigType(typeof(CustomProperty)).TypeConstruction = TypeConstruction.ByUninitialized();
config.ConfigType<CustomProperty>().ConstructByUninitialized();


var ceras = new CerasSerializer(config);

Expand Down
2 changes: 1 addition & 1 deletion src/Ceras/Ceras.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- NuGet Package -->
<PropertyGroup>
<Version>4.1.6</Version>
<Version>4.1.7</Version>
<Authors>rikimaru0345</Authors>
<Copyright>https://github.com/rikimaru0345/Ceras/blob/master/LICENSE</Copyright>
<PackageProjectUrl>https://github.com/rikimaru0345/Ceras</PackageProjectUrl>
Expand Down

0 comments on commit 1eb2312

Please sign in to comment.