diff --git a/framework/src/Volo.Abp.AzureServiceBus/Volo.Abp.AzureServiceBus.csproj b/framework/src/Volo.Abp.AzureServiceBus/Volo.Abp.AzureServiceBus.csproj index 98a67869cf..aef38c1e10 100644 --- a/framework/src/Volo.Abp.AzureServiceBus/Volo.Abp.AzureServiceBus.csproj +++ b/framework/src/Volo.Abp.AzureServiceBus/Volo.Abp.AzureServiceBus.csproj @@ -5,6 +5,8 @@ netstandard2.0;netstandard2.1;net7.0 + enable + Nullable Volo.Abp.AzureServiceBus Volo.Abp.AzureServiceBus $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.AzureServiceBus/Volo/Abp/AzureServiceBus/AzureServiceBusMessageConsumer.cs b/framework/src/Volo.Abp.AzureServiceBus/Volo/Abp/AzureServiceBus/AzureServiceBusMessageConsumer.cs index 71143b834e..4417a6ef79 100644 --- a/framework/src/Volo.Abp.AzureServiceBus/Volo/Abp/AzureServiceBus/AzureServiceBusMessageConsumer.cs +++ b/framework/src/Volo.Abp.AzureServiceBus/Volo/Abp/AzureServiceBus/AzureServiceBusMessageConsumer.cs @@ -20,9 +20,9 @@ public class AzureServiceBusMessageConsumer : IAzureServiceBusMessageConsumer, I private readonly IExceptionNotifier _exceptionNotifier; private readonly IProcessorPool _processorPool; private readonly ConcurrentBag> _callbacks; - private string _connectionName; - private string _subscriptionName; - private string _topicName; + private string _connectionName = default!; + private string _subscriptionName = default!; + private string _topicName = default!; public AzureServiceBusMessageConsumer( IExceptionNotifier exceptionNotifier, @@ -37,7 +37,7 @@ public class AzureServiceBusMessageConsumer : IAzureServiceBusMessageConsumer, I public virtual void Initialize( [NotNull] string topicName, [NotNull] string subscriptionName, - string connectionName) + string? connectionName) { Check.NotNull(topicName, nameof(topicName)); Check.NotNull(subscriptionName, nameof(subscriptionName)); diff --git a/framework/src/Volo.Abp.AzureServiceBus/Volo/Abp/AzureServiceBus/ClientConfig.cs b/framework/src/Volo.Abp.AzureServiceBus/Volo/Abp/AzureServiceBus/ClientConfig.cs index 9b9cbd6843..02b8397917 100644 --- a/framework/src/Volo.Abp.AzureServiceBus/Volo/Abp/AzureServiceBus/ClientConfig.cs +++ b/framework/src/Volo.Abp.AzureServiceBus/Volo/Abp/AzureServiceBus/ClientConfig.cs @@ -5,7 +5,7 @@ namespace Volo.Abp.AzureServiceBus; public class ClientConfig { - public string ConnectionString { get; set; } + public string ConnectionString { get; set; } = default!; public ServiceBusAdministrationClientOptions Admin { get; set; } = new();