Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jefffhaynes committed Aug 23, 2023
1 parent 70a36ee commit 56ccb37
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions BinarySerializer.Test/Issues/Issue124/Packet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public class Packet
public ushort L_PACKET { get; set; }

[FieldOrder(3)]
#pragma warning disable CS0618 // Type or member is obsolete
[SerializeWhenNot(nameof(NID_PACKET), null)]
#pragma warning restore CS0618 // Type or member is obsolete
[Subtype(nameof(NID_PACKET), NID_PACKETNUM.PACKET1, typeof(Packet1), BindingMode = BindingMode.OneWay)]
[Subtype(nameof(NID_PACKET), NID_PACKETNUM.PACKETN, typeof(PacketN), BindingMode = BindingMode.OneWay)]
//L_PACKET = bit length of PacketBody + bit length of NID_PACKET(10)+ bit length of L_PACKET(13)
Expand Down
2 changes: 1 addition & 1 deletion BinarySerializer/BinarySerializer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageReadmeFile>README.md</PackageReadmeFile>
<AssemblyVersion>8.6.2.3</AssemblyVersion>
<AssemblyVersion>8.6.4.1</AssemblyVersion>
<Version>$(AssemblyVersion)</Version>
<FileVersion>$(AssemblyVersion)</FileVersion>
</PropertyGroup>
Expand Down
8 changes: 4 additions & 4 deletions BinarySerializer/Graph/ValueGraph/ObjectValueNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected virtual void ObjectSerializeOverride(BoundedStream stream, EventShuttl

foreach (var child in serializableChildren)
{
if (!child.ShouldSerialize())
if (!child.ShouldSerialize)
{
continue;
}
Expand Down Expand Up @@ -194,7 +194,7 @@ await customValueNode.SerializeOverrideAsync(stream, eventShuttle, cancellationT

foreach (var child in serializableChildren)
{
if (!child.ShouldSerialize())
if (!child.ShouldSerialize)
{
continue;
}
Expand Down Expand Up @@ -224,7 +224,7 @@ protected virtual void ObjectDeserializeOverride(BoundedStream stream, Serializa

foreach (var child in GetSerializableChildren())
{
if (!child.ShouldDeserialize())
if (!child.ShouldDeserialize)
{
continue;
}
Expand Down Expand Up @@ -256,7 +256,7 @@ await customValueNode.DeserializeOverrideAsync(stream, options, eventShuttle, ca

foreach (var child in GetSerializableChildren())
{
if (!child.ShouldDeserialize())
if (!child.ShouldDeserialize)
{
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions BinarySerializer/Graph/ValueGraph/ValueNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ private bool ShouldSerializeImpl(Func<Binding, object> bindingValueSelector)
TypeNode.SerializeWhenBindings.Any(binding => binding.IsSatisfiedBy(bindingValueSelector(binding)));
}

private bool ShouldSerialize => ShouldSerializeImpl(binding => binding.GetBoundValue(this));
internal bool ShouldSerialize => ShouldSerializeImpl(binding => binding.GetBoundValue(this));

private bool ShouldDeserialize => ShouldSerializeImpl(binding => binding.GetValue(this));
internal bool ShouldDeserialize => ShouldSerializeImpl(binding => binding.GetValue(this));

public virtual void Bind()
{
Expand Down

0 comments on commit 56ccb37

Please sign in to comment.