Skip to content
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a59c014
Fix NRT errors and enable TreatWarningsAsErrors
niemyjski Apr 10, 2026
bfb0df3
Address PR review feedback: fail-fast, null guards, and benchmark cor…
niemyjski Apr 10, 2026
6fcf7b5
fix: address Copilot review feedback - add null guards and remove red…
niemyjski Apr 10, 2026
47a001e
Address owner review feedback on PR #159
niemyjski Apr 10, 2026
d1d1750
fix: address owner and copilot PR review feedback
niemyjski Apr 10, 2026
89364ab
Remove redundant null guards from PingQueueJob and modernize construc…
niemyjski Apr 10, 2026
d329072
Address PR review comments: eliminate null-forgiving hacks with prope…
niemyjski Apr 10, 2026
99294fe
Fix Copilot review: move _scriptsLoaded before null check, fix paramName
niemyjski Apr 10, 2026
b911589
Make required options properties non-nullable with = null! pattern
niemyjski Apr 10, 2026
511e939
Address Copilot review: add options null guard, remove unnecessary nu…
niemyjski Apr 10, 2026
e349a2b
Fix unresolved PR comments, use QueueException for queue operations
niemyjski Apr 10, 2026
f163624
Address remaining PR feedback: records, formatting, exception types, …
niemyjski Apr 10, 2026
92c32e8
Address PR review comments: proper null handling, consistency, GetScr…
niemyjski Apr 10, 2026
f796ddd
fix: address remaining review comments on NRT PR
niemyjski Apr 11, 2026
13fc230
Address PR review feedback: fix CacheValue semantics, ThrowIfNull pat…
niemyjski Apr 11, 2026
d08fb00
Fix RedisExtensions: use InvalidOperationException for null Redis val…
niemyjski Apr 11, 2026
8ff5393
fix: address review feedback - NormalizePath non-nullable, remove Get…
niemyjski Apr 11, 2026
1f9cd53
fix: address owner review feedback and update Foundatio to beta3.48
niemyjski Apr 11, 2026
b7de124
fix: correct Foundatio NuGet version to 13.0.0-beta3.42
niemyjski Apr 11, 2026
8918304
chore: update Foundatio packages to 13.0.0-beta3.43
niemyjski Apr 11, 2026
1a9689a
fix: add null guards to PingQueueJob for queue entry Value
niemyjski Apr 12, 2026
1b55340
Address PR feedback: remove hacks, use .ToString() over casts, fix NR…
niemyjski Apr 12, 2026
72d5c6c
Apply formatting and nullability feedback: newlines after returns, nu…
niemyjski Apr 12, 2026
b791ce4
updated tests
niemyjski Apr 12, 2026
3781f6a
fix: throw in lock test constructor when muxer is null, apply dotnet …
niemyjski Apr 12, 2026
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
1 change: 1 addition & 0 deletions build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<NoWarn>$(NoWarn);CS1591</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageOutputPath>$(SolutionDir)artifacts</PackageOutputPath>
<PackageIcon>foundatio-icon.png</PackageIcon>
Expand Down
16 changes: 8 additions & 8 deletions samples/Foundatio.SampleJob/PingQueueJob.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading;
using System.Threading.Tasks;
using Exceptionless;
Expand Down Expand Up @@ -26,9 +26,9 @@ public PingQueueJob(IQueue<PingRequest> queue, ICacheClient cacheClient, IMessag

public int RunCount => _runCount;

protected override Task<ILock> GetQueueEntryLockAsync(IQueueEntry<PingRequest> queueEntry, CancellationToken cancellationToken = new CancellationToken())
protected override Task<ILock?> GetQueueEntryLockAsync(IQueueEntry<PingRequest> queueEntry, CancellationToken cancellationToken = new CancellationToken())
{
return _locker.AcquireAsync(String.Concat("pull:", queueEntry.Value.Id),
return _locker.AcquireAsync(String.Concat("pull:", queueEntry.Value!.Id),
TimeSpan.FromMinutes(30),
TimeSpan.FromSeconds(1));
}
Expand All @@ -40,16 +40,16 @@ protected override async Task<JobResult> ProcessQueueEntryAsync(QueueEntryContex
_logger.LogInformation("Got {RunCount} ping. Sending pong!", RunCount.ToOrdinal());
await Task.Delay(TimeSpan.FromMilliseconds(1)).AnyContext();

if (RandomData.GetBool(context.QueueEntry.Value.PercentChanceOfException))
if (RandomData.GetBool(context.QueueEntry.Value!.PercentChanceOfException))
throw new ApplicationException("Boom!");
Comment thread
niemyjski marked this conversation as resolved.
Comment thread
niemyjski marked this conversation as resolved.
Comment thread
niemyjski marked this conversation as resolved.

return JobResult.Success;
}
}

public class PingRequest
public record PingRequest
{
public string Data { get; set; }
public string Id { get; set; }
public int PercentChanceOfException { get; set; } = 0;
public required string Data { get; set; }
public required string Id { get; set; }
public int PercentChanceOfException { get; set; }
}
6 changes: 3 additions & 3 deletions samples/Foundatio.SampleJob/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Foundatio.SampleJob;

public class Program
{
private static ILogger _logger;
private static ILogger _logger = null!;
Comment thread
niemyjski marked this conversation as resolved.

public static int Main()
{
Expand All @@ -27,7 +27,7 @@ private static void HandleEchoMessage(EchoMessage m)
}
}

public class EchoMessage
public record EchoMessage
{
public string Message { get; set; }
public required string Message { get; set; }
}
2 changes: 1 addition & 1 deletion samples/Foundatio.SampleJob/SampleServiceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Foundatio.SampleJob;

public class SampleServiceProvider
{
public static IServiceProvider Create(ILoggerFactory loggerFactory)
public static IServiceProvider Create(ILoggerFactory? loggerFactory)
{
var container = new ServiceCollection();

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

<ItemGroup>
<PackageReference Include="Foundatio.Xunit.v3" Version="13.0.0-beta3.32" />
<PackageReference Include="Foundatio.Xunit.v3" Version="13.0.0-beta3.43" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 9 additions & 9 deletions samples/Foundatio.SampleJobClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ namespace Foundatio.SampleJobClient;

public class Program
{
private static IQueue<PingRequest> _queue;
private static IMessageBus _messageBus;
private static TestLogger _loggerFactory;
private static ILogger _logger;
private static IQueue<PingRequest> _queue = null!;
private static IMessageBus _messageBus = null!;
private static TestLogger _loggerFactory = null!;
private static ILogger _logger = null!;
private static bool _isRunning = true;
private static CancellationTokenSource _continuousEnqueueTokenSource = new();

Expand Down Expand Up @@ -210,14 +210,14 @@ private static ConsoleColor GetColor(LogEntry logEntry)
}
}

public class EchoMessage
public record EchoMessage
{
public string Message { get; set; }
public required string Message { get; set; }
}

public class PingRequest
public record PingRequest
{
public string Data { get; set; }
public required string Data { get; set; }
public string Id { get; set; } = Guid.NewGuid().ToString("N");
public int PercentChanceOfException { get; set; } = 0;
public int PercentChanceOfException { get; set; }
}
Loading
Loading