Skip to content

Commit

Permalink
Switch to Polysharp and allow null strings in TryParse
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Mar 28, 2023
1 parent d2e08c6 commit 4cf3194
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReference Include="Azure.Storage.Queues" Version="12.13.1" />
<PackageReference Include="Azure.Data.Tables" Version="12.8.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageReference Include="Nullable" Version="1.3.1" />
<PackageReference Include="PolySharp" Version="1.12.1" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/CloudStorageAccount/CloudStorageAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public static CloudStorageAccount Parse(string connectionString)
/// <param name="account">A <see cref="CloudStorageAccount"/> object to hold the instance returned if
/// the connection string can be parsed.</param>
/// <returns><b>true</b> if the connection string was successfully parsed; otherwise, <b>false</b>.</returns>
public static bool TryParse(string connectionString, [NotNullWhen(true)] out CloudStorageAccount? account)
public static bool TryParse(string? connectionString, [NotNullWhen(true)] out CloudStorageAccount? account)
{
if (string.IsNullOrEmpty(connectionString))
{
Expand All @@ -364,7 +364,7 @@ public static bool TryParse(string connectionString, [NotNullWhen(true)] out Clo

try
{
return ParseImpl(connectionString, out account, err => { });
return ParseImpl(connectionString!, out account, err => { });
}
catch (Exception)
{
Expand Down
2 changes: 1 addition & 1 deletion src/CloudStorageAccount/CloudStorageAccount.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PackageReference Include="Azure.Storage.Queues" Version="12.13.1" />
<PackageReference Include="Azure.Data.Tables" Version="12.8.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="all" />
<PackageReference Include="PolySharp" Version="1.12.1" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 4cf3194

Please sign in to comment.