public PrintManagerFactory(PrintServiceConfig printServiceConfig, ILogger logger, IPrintServiceNotificationProvider provider) { PrintManagerProviderFactory factory = new PrintManagerProviderFactory(printServiceConfig, new PrintManagerChannelFactory(printServiceConfig), provider); this.printManagerProviderDictionary = new Dictionary<string, Dictionary<PrintMode, IPrintManagerProvider>>(); foreach (PrintManagerConfig config in printServiceConfig.PrinterConfig) { string key = string.Empty; switch (config.PrintManagerType) { case PrintManagerType.BallyCentralPrintManager: key = "PM"; break; default: case PrintManagerType.None: throw new NotSupportedException("config.PrintManagerType not Supported"); } Dictionary<PrintMode, IPrintManagerProvider> printManagerProvider = new Dictionary<PrintMode, IPrintManagerProvider>(); foreach (var item in Enum.GetValues(typeof(PrintMode)).OfType<PrintMode>()) { printManagerProvider[item] = factory.GetPrintManager(key, item); } this.printManagerProviderDictionary[config.Key] = printManagerProvider; } factory.StartListeners(); }
public PrintManagerAsyncProvider( PrintManagerChannelFactory printManagerChannelFactory, IPrintServiceNotificationProvider printServiceNotificationProvider, IPrintManagerNotificationHandler printManagerNotificationHandler) { this.printManagerChannelFactory = printManagerChannelFactory; this.printManagerNotificationHandler = printManagerNotificationHandler; this.printServiceNotificationProvider = printServiceNotificationProvider; }
public PrintManagerAsyncProvider( PrintManagerChannelFactory printManagerChannelFactory, IPrintServiceNotificationProvider printServiceNotificationProvider, IPrintManagerNotificationHandler printManagerNotificationHandler) { this.printManagerChannelFactory = printManagerChannelFactory; this.printManagerNotificationHandler = printManagerNotificationHandler; this.printServiceNotificationProvider = printServiceNotificationProvider; }
public PrintManagerProviderFactory(PrintServiceConfig printServiceConfig, PrintManagerChannelFactory factory, IPrintServiceNotificationProvider provider) { this.factory = factory; this.provider = provider; this.servcieHost = new ServiceHost(new PrintManagerCallback(this.provider), new Uri(printServiceConfig.ListenUri)); }
public PrintManagerProviderFactory(PrintServiceConfig printServiceConfig, PrintManagerChannelFactory factory, IPrintServiceNotificationProvider provider) { this.factory = factory; this.provider = provider; this.servcieHost = new ServiceHost(new PrintManagerCallback(this.provider), new Uri(printServiceConfig.ListenUri)); }
public PrintManagerFactory(PrintServiceConfig printServiceConfig, ILogger logger, IPrintServiceNotificationProvider provider) { PrintManagerProviderFactory factory = new PrintManagerProviderFactory(printServiceConfig, new PrintManagerChannelFactory(printServiceConfig), provider); this.printManagerProviderDictionary = new Dictionary <string, Dictionary <PrintMode, IPrintManagerProvider> >(); foreach (PrintManagerConfig config in printServiceConfig.PrinterConfig) { string key = string.Empty; switch (config.PrintManagerType) { case PrintManagerType.BallyCentralPrintManager: key = "PM"; break; default: case PrintManagerType.None: throw new NotSupportedException("config.PrintManagerType not Supported"); } Dictionary <PrintMode, IPrintManagerProvider> printManagerProvider = new Dictionary <PrintMode, IPrintManagerProvider>(); foreach (var item in Enum.GetValues(typeof(PrintMode)).OfType <PrintMode>()) { printManagerProvider[item] = factory.GetPrintManager(key, item); } this.printManagerProviderDictionary[config.Key] = printManagerProvider; } factory.StartListeners(); }