Skip to content

Commit

Permalink
Merge pull request #6892 from Particular/databus_newtonsoft_serilaliz…
Browse files Browse the repository at this point in the history
…er_bug_8_0

DataBus changes in NServiceBus 8 do not work with NewtonsoftJsonSerializer
  • Loading branch information
jpalac authored Oct 12, 2023
2 parents f56864e + c6d0eaa commit 310b8e7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/NServiceBus.Core/DataBus/DataBusProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ public class DataBusProperty<T> : IDataBusProperty, ISerializable where T : clas
/// <summary>
/// initializes a <see cref="DataBusProperty{T}" /> with no value set.
/// </summary>
public DataBusProperty() : this(null)
public DataBusProperty()
{
Type = typeof(T);
}

/// <summary>
Expand All @@ -25,11 +24,6 @@ public DataBusProperty() : this(null)
/// <param name="value">The value to initialize with.</param>
public DataBusProperty(T value)
{
if (value != null)
{
Type = typeof(T);
}

SetValue(value);
}

Expand All @@ -54,7 +48,7 @@ protected DataBusProperty(SerializationInfo info, StreamingContext context)
/// <summary>
/// The property <see cref="Type" />.
/// </summary>
public Type Type { get; }
public Type Type { get; } = typeof(T);

/// <summary>
/// The <see cref="IDataBusProperty" /> key.
Expand Down

0 comments on commit 310b8e7

Please sign in to comment.