Skip to content
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
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 5.6.0
- Added
- netstandard2.0 target framework.

## 5.5.4
- fixed
- Fixed an issue where teh async api schema generation was not working properly with Saunter 5.5.3
Expand Down
16 changes: 10 additions & 6 deletions src/Ev.ServiceBus.Abstractions/Configuration/ConnectionSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,15 @@ public override bool Equals(object? obj)

public override int GetHashCode()
{
return HashCode.Combine(
Endpoint,
ConnectionString,
Options,
FullyQualifiedNamespace,
Credentials);
unchecked
{
int hash = 17;
hash = hash * 23 + (Endpoint?.GetHashCode() ?? 0);
hash = hash * 23 + (ConnectionString?.GetHashCode() ?? 0);
hash = hash * 23 + (Options?.GetHashCode() ?? 0);
hash = hash * 23 + (FullyQualifiedNamespace?.GetHashCode() ?? 0);
hash = hash * 23 + (Credentials?.GetHashCode() ?? 0);
return hash;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net8.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>
Expand All @@ -17,7 +17,10 @@
<PackageReference Include="Azure.Identity" Version="1.17.0" />
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.20.1" />
</ItemGroup>


<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Ev.ServiceBus.Abstractions/MessageHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
var appsString = TryGetValue(message, UserProperties.IsolationApps);
if (string.IsNullOrEmpty(appsString))
return [];
return appsString.Split(',');

Check warning on line 46 in src/Ev.ServiceBus.Abstractions/MessageHelper.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.
}

public static string[] GetIsolationApps(this IReadOnlyDictionary<string, object> applicationProperties)
Expand Down Expand Up @@ -84,7 +84,7 @@
{
if (isolationApps.Length == 0)
return message;
message.ApplicationProperties[UserProperties.IsolationApps] = string.Join(',', isolationApps);
message.ApplicationProperties[UserProperties.IsolationApps] = string.Join(",", isolationApps);
return message;
}

Expand All @@ -92,5 +92,5 @@
{
if (string.IsNullOrEmpty(isolationKey))
return;
applicationProperties[UserProperties.IsolationKey] = isolationKey;

Check warning on line 95 in src/Ev.ServiceBus.Abstractions/MessageHelper.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference assignment.
}
Expand Down
9 changes: 7 additions & 2 deletions src/Ev.ServiceBus/Ev.ServiceBus.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;netstandard2.0;net8.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Description>This is a wrapper around Microsoft Azure Service Bus
Expand All @@ -15,7 +15,12 @@ Its goal to is make it the easiest possible to connect and handle an Azure Servi
<ItemGroup>
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.20.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1' ">
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
Expand Down
6 changes: 5 additions & 1 deletion src/Ev.ServiceBus/Management/ServiceBusRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ public ServiceBusRegistry(

public IMessageSender? TryGetMessageSender(ClientType clientType, string resourceId)
{
return _messageSenders.GetValueOrDefault(ComputeResourceKey(clientType, resourceId));
var key = ComputeResourceKey(clientType, resourceId);

return _messageSenders.TryGetValue(key, out var value)
? value
: default;
}

public IMessageSender GetMessageSender(ClientType clientType, string resourceId)
Expand Down
Loading