From 625d1eaa1adb14ecf9781d0bd3dec862fceefd23 Mon Sep 17 00:00:00 2001 From: Tomas Pajurek Date: Sun, 17 Nov 2024 18:24:31 +0100 Subject: [PATCH] Use classes with init-only props instead of records for Service Bus entities options (#28) --- .../Resources/InMemoryServiceBusQueueOptions.cs | 6 +++++- .../Resources/InMemoryServiceBusSubscriptionOptions.cs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Spotflow.InMemory.Azure.ServiceBus/Resources/InMemoryServiceBusQueueOptions.cs b/src/Spotflow.InMemory.Azure.ServiceBus/Resources/InMemoryServiceBusQueueOptions.cs index b6bdff1..5924dbc 100644 --- a/src/Spotflow.InMemory.Azure.ServiceBus/Resources/InMemoryServiceBusQueueOptions.cs +++ b/src/Spotflow.InMemory.Azure.ServiceBus/Resources/InMemoryServiceBusQueueOptions.cs @@ -1,3 +1,7 @@ namespace Spotflow.InMemory.Azure.ServiceBus.Resources; -public record InMemoryServiceBusQueueOptions(bool EnableSessions = false, TimeSpan? LockTime = null); +public class InMemoryServiceBusQueueOptions +{ + public bool EnableSessions { get; init; } = false; + public TimeSpan? LockTime { get; init; } = null; +} diff --git a/src/Spotflow.InMemory.Azure.ServiceBus/Resources/InMemoryServiceBusSubscriptionOptions.cs b/src/Spotflow.InMemory.Azure.ServiceBus/Resources/InMemoryServiceBusSubscriptionOptions.cs index 7ddfa5d..4a40273 100644 --- a/src/Spotflow.InMemory.Azure.ServiceBus/Resources/InMemoryServiceBusSubscriptionOptions.cs +++ b/src/Spotflow.InMemory.Azure.ServiceBus/Resources/InMemoryServiceBusSubscriptionOptions.cs @@ -1,3 +1,7 @@ namespace Spotflow.InMemory.Azure.ServiceBus.Resources; -public record InMemoryServiceBusSubscriptionOptions(bool EnableSessions = false, TimeSpan? LockTime = null); +public class InMemoryServiceBusSubscriptionOptions +{ + public bool EnableSessions { get; init; } = false; + public TimeSpan? LockTime { get; init; } = null; +}