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

Add setter for serializable types to allow JSON source generators #524

Merged
merged 1 commit into from
May 26, 2023
Merged
Show file tree
Hide file tree
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
18 changes: 9 additions & 9 deletions src/Tingle.EventBus/Serialization/EventEnvelope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@
public class EventEnvelope : IEventEnvelope
{
/// <inheritdoc/>
public string? Id { get; init; }
public string? Id { get; set; }

/// <inheritdoc/>
public string? RequestId { get; init; }
public string? RequestId { get; set; }

/// <inheritdoc/>
public string? CorrelationId { get; init; }
public string? CorrelationId { get; set; }

/// <inheritdoc/>
public string? InitiatorId { get; init; }
public string? InitiatorId { get; set; }

/// <inheritdoc/>
public DateTimeOffset? Expires { get; init; }
public DateTimeOffset? Expires { get; set; }

/// <inheritdoc/>
public DateTimeOffset? Sent { get; init; }
public DateTimeOffset? Sent { get; set; }

/// <inheritdoc/>
public IDictionary<string, string> Headers { get; init; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
public IDictionary<string, string> Headers { get; set; } = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);

/// <inheritdoc/>
public HostInfo? Host { get; init; }
public HostInfo? Host { get; set; }
}

/// <summary>
Expand All @@ -36,5 +36,5 @@ public class EventEnvelope : IEventEnvelope
public class EventEnvelope<T> : EventEnvelope, IEventEnvelope<T> where T : class
{
/// <inheritdoc/>
public T? Event { get; init; }
public T? Event { get; set; }
}
12 changes: 6 additions & 6 deletions src/Tingle.EventBus/Serialization/HostInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,35 @@ public record HostInfo
/// The machine name (or role instance name) of the machine.
/// </summary>
/// <example>WIN-HQ1243</example>
public virtual string? MachineName { get; init; }
public virtual string? MachineName { get; set; }

/// <summary>
/// The name of the application.
/// </summary>
/// <example>Tingle.EventBus.Examples.SimplePublisher</example>
public virtual string? ApplicationName { get; init; }
public virtual string? ApplicationName { get; set; }

/// <summary>
/// The version of the application.
/// </summary>
/// <example>1.0.0.0</example>
public virtual string? ApplicationVersion { get; init; }
public virtual string? ApplicationVersion { get; set; }

/// <summary>
/// The name of the environment the application is running in.
/// </summary>
/// <example>Production</example>
public virtual string? EnvironmentName { get; init; }
public virtual string? EnvironmentName { get; set; }

/// <summary>
/// The version of the library.
/// </summary>
/// <example>1.0.0.0</example>
public virtual string? LibraryVersion { get; init; }
public virtual string? LibraryVersion { get; set; }

/// <summary>
/// The operating system hosting the application.
/// </summary>
/// <example>Microsoft Windows NT 10.0.19042.0</example>
public virtual string? OperatingSystem { get; init; }
public virtual string? OperatingSystem { get; set; }
}