internal static IPrintService Create(IConfigService configService, ILogger logger)
        {
            IPrintService printService = null;
            PrintServiceConfig printServiceConfig = configService.Get<PrintServiceConfig>("PrintManager", "ServiceConfig", null);
            if (null == printServiceConfig)
            {
                printService = new PrintServiceNull();
                logger.LogDebug("PrintService", "Print Service not configured. All request to print will throw exception");
            }
            else
            {
                printService = new PrintService(printServiceConfig, logger);
            }

            return printService;
        }
Beispiel #2
0
        internal static IPrintService Create(IConfigService configService, ILogger logger)
        {
            IPrintService      printService       = null;
            PrintServiceConfig printServiceConfig = configService.Get <PrintServiceConfig>("PrintManager", "ServiceConfig", null);

            if (null == printServiceConfig)
            {
                printService = new PrintServiceNull();
                logger.LogDebug("PrintService", "Print Service not configured. All request to print will throw exception");
            }
            else
            {
                printService = new PrintService(printServiceConfig, logger);
            }

            return(printService);
        }