Add project files.
This commit is contained in:
16
ConfigurationPannel/Services/NoOpPrintJobSource.cs
Normal file
16
ConfigurationPannel/Services/NoOpPrintJobSource.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Threading.Channels;
|
||||
using Inspectron.Epson.PrintServer;
|
||||
|
||||
namespace ConfigurationPannel.Services;
|
||||
|
||||
public class NoOpPrintJobSource : IPrintJobSource
|
||||
{
|
||||
private readonly Channel<PrintJob> _channel = Channel.CreateUnbounded<PrintJob>();
|
||||
|
||||
public Task<PrintJob> GetNextJobAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
// Blocks indefinitely, keeping PrintLoop alive without processing jobs
|
||||
// This stub implementation keeps the loop running but never provides actual jobs
|
||||
return _channel.Reader.ReadAsync(cancellationToken).AsTask();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user