Skip to content

Commit 12f9e18

Browse files
committed
Remove nullable annotation warnings
1 parent 2c85878 commit 12f9e18

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

Lib.GAB.Example/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static async Task RunGabsAwareExample()
9090
server.Events.RegisterChannel("game/status", "Game status events");
9191

9292
// Register a custom tool manually
93-
server.Tools.RegisterTool("game/status", _ => Task.FromResult<object?>(new
93+
server.Tools.RegisterTool("game/status", _ => Task.FromResult<object>(new
9494
{
9595
status = "running",
9696
players = 1,
@@ -140,7 +140,7 @@ static async Task RunTraditionalExample()
140140
server.Events.RegisterChannel("game/status", "Game status events");
141141

142142
// Register a custom tool manually
143-
server.Tools.RegisterTool("game/status", _ => Task.FromResult<object?>(new
143+
server.Tools.RegisterTool("game/status", _ => Task.FromResult<object>(new
144144
{
145145
status = "running",
146146
players = 1,
@@ -188,7 +188,7 @@ static async Task RunExternalConfigExample()
188188
server.Events.RegisterChannel("game/status", "Game status events");
189189

190190
// Register a custom tool manually
191-
server.Tools.RegisterTool("game/status", _ => Task.FromResult<object?>(new
191+
server.Tools.RegisterTool("game/status", _ => Task.FromResult<object>(new
192192
{
193193
status = "running",
194194
players = 1,

Lib.GAB.Tests/ActualGabsLibGabIntegrationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class ActualGabsLibGabIntegrationTests : IDisposable
1818
private readonly ITestOutputHelper _output;
1919
private readonly string _gabsExecutable;
2020
private readonly string _testConfigDir;
21-
private Process? _gabsServerProcess;
21+
private Process _gabsServerProcess;
2222

2323
public ActualGabsLibGabIntegrationTests(ITestOutputHelper output)
2424
{
@@ -404,4 +404,4 @@ public void Dispose()
404404
_output.WriteLine($"Error cleaning up test directory: {ex.Message}");
405405
}
406406
}
407-
}
407+
}

Lib.GAB.Tests/EndToEndIntegrationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class EndToEndIntegrationTests : IDisposable
1818
private readonly ITestOutputHelper _output;
1919
private readonly string _gabsExecutable;
2020
private readonly string _testWorkspace;
21-
private Process? _gabsProcess;
21+
private Process _gabsProcess;
2222

2323
public EndToEndIntegrationTests(ITestOutputHelper output)
2424
{
@@ -384,4 +384,4 @@ public void Dispose()
384384
_output.WriteLine($"Error cleaning up test workspace: {ex.Message}");
385385
}
386386
}
387-
}
387+
}

Lib.GAB.Tests/RealGabsIntegrationTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class RealGabsIntegrationTests : IDisposable
2020
private readonly ITestOutputHelper _output;
2121
private readonly string _gabsExecutable;
2222
private readonly string _tempDir;
23-
private Process? _gabsProcess;
23+
private Process _gabsProcess;
2424

2525
public RealGabsIntegrationTests(ITestOutputHelper output)
2626
{
@@ -532,7 +532,7 @@ public void Dispose()
532532
private class GameOperationResult
533533
{
534534
public bool Success { get; set; }
535-
public string? Error { get; set; }
535+
public string Error { get; set; }
536536
public int Port { get; set; }
537537
}
538538

@@ -542,4 +542,4 @@ private class ProcessResult
542542
public string Output { get; set; } = "";
543543
public string Error { get; set; } = "";
544544
}
545-
}
545+
}

Lib.GAB.Tests/UnitTest1.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void CanRegisterTool()
2525
var server = Gabp.CreateSimpleServer("Test App", "1.0.0");
2626

2727
// Act
28-
server.Tools.RegisterTool("test/hello", _ => Task.FromResult<object?>("Hello World"));
28+
server.Tools.RegisterTool("test/hello", _ => Task.FromResult<object>("Hello World"));
2929

3030
// Assert
3131
Assert.True(server.Tools.HasTool("test/hello"));
@@ -38,7 +38,7 @@ public async Task CanCallTool()
3838
{
3939
// Arrange
4040
var server = Gabp.CreateSimpleServer("Test App", "1.0.0");
41-
server.Tools.RegisterTool("test/echo", args => Task.FromResult<object?>(args));
41+
server.Tools.RegisterTool("test/echo", args => Task.FromResult<object>(args));
4242

4343
// Act
4444
var result = await server.Tools.CallToolAsync("test/echo", "test message");
@@ -159,4 +159,4 @@ public string ToUpper([ToolParameter(Description = "Input string")] string input
159159
{
160160
return input.ToUpper();
161161
}
162-
}
162+
}

0 commit comments

Comments
 (0)