Beispiel #1
0
 /// <summary>
 /// Sets printer
 /// </summary>
 /// <param name="machine">Printer machine</param>
 public void SetPrinter(IPrintingMachine machine)
 {
     if (machine == null)
     {
         throw new ArgumentNullException("Printer is null!");
     }
     printer = machine;
     Console.WriteLine("Name of printer : " + printer.ToString());
 }
Beispiel #2
0
 /// <summary>
 /// Constructor for Folder Deamon Class
 /// </summary>
 /// <param name="machine">Printer</param>
 /// <param name="args">Arguments, Flags</param>
 public FolderDeamon(IPrintingMachine machine, string[] args)
 {
     if (machine == null)
     {
         throw new ArgumentNullException("PrintingMachine is null.");
     }
     if (args == null)
     {
         throw new ArgumentNullException("Args is null.");
     }
     filter    = "";
     folder    = "";
     printer   = machine;
     watcher   = null;
     arguments = args;
 }