Skip to content

Commit f02381f

Browse files
authored
nullability fix in IRepository (#66)
1 parent d57e5af commit f02381f

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
next-version: 1.4.0
1+
next-version: 1.4.1
22
mode: ContinuousDelivery
33
branches:
44
release:

host/Abstract/IRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public interface IRepository
2222
/// </summary>
2323
/// <param name="userId"></param>
2424
/// <returns></returns>
25-
Task<User> GetUserAsync(int userId);
25+
Task<User?> GetUserAsync(int userId);
2626

2727
/// <summary>
2828
/// Saves the user to the persistence layer.

reference-game/DummyRepository.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public Task DeleteUserAsync(User user)
1818
return Task.CompletedTask;
1919
}
2020

21-
public Task<User> GetUserAsync(int userId)
21+
public Task<User?> GetUserAsync(int userId)
2222
{
23-
return Task.FromResult<User>(playerList[userId]);
23+
return Task.FromResult<User?>(playerList[userId]);
2424
}
2525

2626
public Task<IEnumerable<User>> GetUsers()

reference-game/ReferenceGame.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net9.0</TargetFramework>
66
<RootNamespace>MultiplayerHost.ReferenceGame</RootNamespace>
7+
<Nullable>enable</Nullable>
78
</PropertyGroup>
89

910
<ItemGroup>

0 commit comments

Comments
 (0)