Implemented VirtualPrinterDriver project
This commit is contained in:
parent
f29c84821b
commit
5c87967c3f
125 changed files with 8191 additions and 0 deletions
38
Agent/VirtualPrinter.Delivery/Program.cs
Normal file
38
Agent/VirtualPrinter.Delivery/Program.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
|
||||
using JetBrains.Annotations;
|
||||
|
||||
using static VirtualPrinter.Delivery.Redirector;
|
||||
|
||||
namespace VirtualPrinter.Delivery
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
private const string RedirectCmd = "redirect";
|
||||
|
||||
[STAThread]
|
||||
private static void Main([CanBeNull]string[] args)
|
||||
{
|
||||
if (args == null || args.Length < 1) {
|
||||
NotUseful();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (args[0]) {
|
||||
case RedirectCmd: {
|
||||
RedirectToPrinter(args[1], args[2]);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
NotUseful();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void NotUseful()
|
||||
{
|
||||
throw new ArgumentNullException($"Use '{RedirectCmd}'!");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue