Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ctor for DefaultPayloadConverter public to expose JsonSerializerOptions #226

Merged
merged 4 commits into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions src/Temporalio/Converters/DefaultPayloadConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,8 @@ public DefaultPayloadConverter()
/// Initializes a new instance of the <see cref="DefaultPayloadConverter"/> class.
/// </summary>
/// <param name="jsonSerializerOptions">Custom serializer options.</param>
/// <remarks>
/// This is protected because payload converters are referenced as class types, not
/// instances, so only subclasses would call this.
/// </remarks>
/// <seealso cref="DefaultPayloadConverter()" />
protected DefaultPayloadConverter(JsonSerializerOptions jsonSerializerOptions)
public DefaultPayloadConverter(JsonSerializerOptions jsonSerializerOptions)
ElanHasson marked this conversation as resolved.
Show resolved Hide resolved
: this(
new BinaryNullConverter(),
new BinaryPlainConverter(),
Expand All @@ -73,12 +69,8 @@ protected DefaultPayloadConverter(JsonSerializerOptions jsonSerializerOptions)
/// <param name="encodingConverters">
/// Encoding converters to use. Duplicate encodings not allowed.
/// </param>
/// <remarks>
/// This is protected because payload converters are referenced as class types, not
/// instances, so only subclasses would call this.
/// </remarks>
/// <seealso cref="DefaultPayloadConverter()" />
protected DefaultPayloadConverter(params IEncodingConverter[] encodingConverters)
public DefaultPayloadConverter(params IEncodingConverter[] encodingConverters)
{
EncodingConverters = Array.AsReadOnly(encodingConverters);
IndexedEncodingConverters = encodingConverters.ToDictionary(
Expand Down
Loading