refactor Queue namespace

This commit is contained in:
EugeneTes
2026-02-03 10:54:41 +01:00
parent d738699acc
commit dca0f259ac
16 changed files with 34 additions and 19 deletions

View File

@@ -1,5 +1,6 @@
using Inspectron.Epson;
using Inspectron.Epson.PrintServer.ConfigurationSources;
using Inspectron.Epson.Queue;
using Microsoft.Extensions.Logging;
namespace EpsonPrintService;

View File

@@ -11,6 +11,7 @@ using Inspectron.Epson.PrintServer.Printers;
using Inspectron.Epson.PrintServer.Printers.Utils;
using Inspectron.Epson.PrintServer.PrintServices;
using EpsonPrintService;
using Inspectron.Epson.Queue;
StandardKernel kernel = new StandardKernel();

View File

@@ -1,4 +1,6 @@
namespace Inspectron.Epson.PrintServer;
using Inspectron.Epson.Queue;
namespace Inspectron.Epson.PrintServer;
public interface IPrintJobSource
{

View File

@@ -2,6 +2,7 @@
using System.Text.Json.Serialization;
using System.Threading.Channels;
using Inspectron.Epson.PrintServer.ConfigurationSources;
using Inspectron.Epson.Queue;
using Microsoft.AspNetCore.SignalR.Client;
using Microsoft.Extensions.Logging;

View File

@@ -1,4 +1,5 @@
using System.Threading.Channels;
using Inspectron.Epson.Queue;
namespace Inspectron.Epson.PrintServer.JobSources;

View File

@@ -1,11 +1,12 @@
using Inspectron.Epson.PrintServer.PrintServices;
using Inspectron.Epson.Queue;
using Microsoft.Extensions.Logging;
namespace Inspectron.Epson.PrintServer;
public class PrintLoop
{
private readonly global::PrintServer _printServer;
private readonly global::Inspectron.Epson.Queue.PrintServer _printServer;
private readonly IPrintService _printService;
private readonly IPrintJobSource _jobSource;
@@ -13,7 +14,7 @@ public class PrintLoop
private CancellationTokenSource? _cancellationSource;
private CancellationToken _cancellationToken;
public PrintLoop(global::PrintServer printServer,IPrintService printService, IPrintJobSource jobSource, ILogger logger)
public PrintLoop(global::Inspectron.Epson.Queue.PrintServer printServer,IPrintService printService, IPrintJobSource jobSource, ILogger logger)
{
_printServer = printServer;
_printService = printService;

View File

@@ -1,6 +1,7 @@
using Microsoft.Extensions.Logging;
using Inspectron.Epson.PrintServer.Printers;
using Inspectron.Epson.PrintServer.Printers.Utils;
using Inspectron.Epson.Queue;
namespace Inspectron.Epson.PrintServer.PrintServices;

View File

@@ -1,4 +1,4 @@
using System.Threading.Tasks;
namespace Inspectron.Epson.Queue;
public interface IJobStatusReporter
{

View File

@@ -1,4 +1,4 @@
using System.Threading.Tasks;
namespace Inspectron.Epson.Queue;
public interface IPrintService
{

View File

@@ -1,4 +1,4 @@
using System.Threading.Tasks;
namespace Inspectron.Epson.Queue;
public class NullJobStatusReporter : IJobStatusReporter
{

View File

@@ -1,3 +1,5 @@
namespace Inspectron.Epson.Queue;
public enum PrintErrorType
{
None,

View File

@@ -1,5 +1,7 @@
using static Inspectron.Epson.PrintServer.JobSources.SignalRPrintJobSource;
namespace Inspectron.Epson.Queue;
public class PrintJob
{
// todo: change to ip address

View File

@@ -1,3 +1,5 @@
namespace Inspectron.Epson.Queue;
public enum PrintJobStatus
{
Received,

View File

@@ -1,3 +1,5 @@
namespace Inspectron.Epson.Queue;
public class PrintResult
{
public bool Success { get; }

View File

@@ -1,6 +1,8 @@
using System.Collections.Concurrent;
using Microsoft.Extensions.Logging;
namespace Inspectron.Epson.Queue;
public class PrintServer
{
private readonly IPrintService _printService;

View File

@@ -1,10 +1,8 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Concurrent;
using Microsoft.Extensions.Logging;
namespace Inspectron.Epson.Queue;
public class PrinterQueue
{
public string PrinterIp { get; }
@@ -140,4 +138,3 @@ public class PrinterQueue
return new List<PrintJob>(_queue);
}
}