/// <summary> /// Initializes a new instance of the <see cref="PrintServerJobLog" /> class. /// </summary> /// <param name="printJobClientId">The print job client identifier.</param> /// <param name="printJob">The <see cref="PrintJobData" />.</param> /// <param name="printQueue">The <see cref="MonitoredQueueInfoCache" />.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="printJob" /> is null. /// <para>or</para> /// <paramref name="printQueue" /> is null. /// </exception> public PrintServerJobLog(Guid printJobClientId, PrintJobData printJob, MonitoredQueueInfoCache printQueue) : this(printJobClientId, printJob) { if (printQueue == null) { throw new ArgumentNullException(nameof(printQueue)); } PrintServer = printQueue.PrintServer; PrintServerOS = printQueue.PrintServerOS; RenderOnClient = printQueue.RenderOnClient; ColorMode = printQueue.ColorMode; Copies = (short)printQueue.Copies; NumberUp = (short)printQueue.NumberUp; Duplex = printQueue.Duplex; }
/// <summary> /// Initializes a new instance of the <see cref="PrintServerJobLog" /> class. /// </summary> /// <param name="printJobClientId">The print job client identifier.</param> /// <param name="printJob">The <see cref="PrintJobData" />.</param> /// <exception cref="ArgumentNullException"><paramref name="printJob" /> is null.</exception> public PrintServerJobLog(Guid printJobClientId, PrintJobData printJob) : this(printJobClientId) { if (printJob == null) { throw new ArgumentNullException(nameof(printJob)); } PrintQueue = printJob.PrinterName; PrintDriver = printJob.DriverName; DataType = printJob.DataType; SubmittedDateTime = printJob.Submitted; SpoolStartDateTime = printJob.SpoolStartTime; SpoolEndDateTime = printJob.SpoolEndTime; PrintStartDateTime = printJob.PrintStartTime; PrintEndDateTime = printJob.PrintEndTime; JobTotalPages = (short?)printJob.TotalPages; PrintedPages = (short?)printJob.PagesPrinted; JobTotalBytes = printJob.TotalBytes; PrintedBytes = printJob.BytesPrinted; EndStatus = printJob.Status.ToString(); }
/// <summary> /// Builds a <see cref="PrintJobDataEventArgs" /> object from the data in this instance. /// </summary> /// <returns></returns> public PrintJobDataEventArgs BuildPrintJobDataEventArgs() { PrintJobData job = new PrintJobData(PrintJobId, _fieldValues, _spoolStartTime, _spoolEndTime, _printStartTime, _printEndTime); return(new PrintJobDataEventArgs(job)); }
/// <summary> /// Initializes a new instance of the <see cref="PrintJobDataEventArgs" /> class. /// </summary> /// <param name="job">The job.</param> public PrintJobDataEventArgs(PrintJobData job) { Job = job; }