Skip to content

Commit

Permalink
Merge pull request #48 from marcominerva/develop
Browse files Browse the repository at this point in the history
Add missing nullability annotation
  • Loading branch information
marcominerva committed Feb 20, 2024
2 parents 15590cd + 7e23560 commit 2a8e2f0
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="TinyHelpers.AspNetCore" Version="3.0.2" />
<PackageReference Include="TinyHelpers.AspNetCore" Version="3.0.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public async Task<Result<PersonWithImage>> GetWithImageAsync(Guid id)
var person = personResult.Content!;

var imageResult = await imageService.GetImageAsync();
if (imageResult.TryGetContent(out var imageFileContent) && imageFileContent is not null)
if (imageResult.TryGetContent(out var imageFileContent))
{
// The image operation succeeded, return person with image
var personWithImage = new PersonWithImage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.2" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OperationResultTools" Version="1.0.15" />
<PackageReference Include="OperationResultTools" Version="1.0.21" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\Toolbox.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OperationResultTools" Version="1.0.15" />
<PackageReference Include="OperationResultTools" Version="1.0.21" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\Toolbox.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/OperationResults/Result{OfT}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace OperationResults;

public class Result<T> : IGenericResult<T>
{
[MemberNotNullWhen(true, nameof(Content))]
public bool Success { get; }

public T? Content { get; }
Expand Down

0 comments on commit 2a8e2f0

Please sign in to comment.