Skip to content

Commit

Permalink
MessagePack: Fix Unused Contractless Resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Jul 5, 2022
1 parent f9440ec commit f716793
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ namespace Reloaded.Messaging.Serializer.MessagePack;
/// </summary>
public class MsgPackSerializer : ISerializer
{
/// <summary>
/// Any custom resolver to pass to MessagePack.
/// Default is <see cref="ContractlessStandardResolver.Instance"/>
/// </summary>
public IFormatterResolver Resolver { get; private set; } = ContractlessStandardResolver.Instance;

/// <summary>
/// Options for the MessagePack serializer.
/// </summary>
Expand All @@ -24,13 +18,11 @@ public class MsgPackSerializer : ISerializer
/// Creates a new instance of the MessagePack serializer.
/// </summary>
/// <param name="resolver">
/// Custom resolver to pass to MessagePack, default is "Contractless Resolver"
/// (<see cref="ContractlessStandardResolver.Instance"/>).
/// Custom resolver to pass to MessagePack, default instance uses "Contractless Resolver".
/// </param>
public MsgPackSerializer(IFormatterResolver resolver = null)
{
if (resolver != null)
Resolver = resolver;
SerializerOptions = SerializerOptions.WithResolver(resolver ?? ContractlessStandardResolver.Instance);
}

/// <inheritdoc />
Expand Down

0 comments on commit f716793

Please sign in to comment.