public void PrintAsync(IPrintData printData, Action <IPrintSuccessResult> onPrintSuccess = null, Action <IPrintErrorResult> onPrintFailure = null) { if (printData == null) { throw new ArgumentNullException("printData", "Print Data supplied is null"); } if (printData.Settings == null) { throw new ArgumentNullException("printData.Settings", "Printer Settings supplied is null"); } if (printData.PrintJobIInfo == null) { throw new ArgumentNullException("printData.PrintJobInfo", "Print Job Id is Null"); } PrintResponse response = new PrintResponse(printData.PrintJobIInfo, onPrintSuccess, onPrintFailure); IPrintManagerProvider provider = this.factory.GetPrintManager(printData.PrintJobIInfo.Key, PrintMode.Async); this.printResponseDictionary[printData.PrintJobIInfo] = response; provider.Print(printData); }
public void PrintAsync(IPrintData printData, Action<IPrintSuccessResult> onPrintSuccess = null, Action<IPrintErrorResult> onPrintFailure = null) { if (printData == null) { throw new ArgumentNullException("printData", "Print Data supplied is null"); } if (printData.Settings == null) { throw new ArgumentNullException("printData.Settings", "Printer Settings supplied is null"); } if (printData.PrintJobIInfo == null) { throw new ArgumentNullException("printData.PrintJobInfo", "Print Job Id is Null"); } PrintResponse response = new PrintResponse(printData.PrintJobIInfo, onPrintSuccess, onPrintFailure); IPrintManagerProvider provider = this.factory.GetPrintManager(printData.PrintJobIInfo.Key, PrintMode.Async); this.printResponseDictionary[printData.PrintJobIInfo] = response; provider.Print(printData); }