Exemple #1
0
        /// <inheritdoc/>
        public IXpsPrinterDefinition Create(PrintQueue printQueue)
        {
            if (printQueue == null)
            {
                throw new ArgumentNullException(nameof(printQueue));
            }

            var result = new XpsPrinterDefinition
            {
                Name = printQueue.Name,
                Host = printQueue.HostingPrintServer.Name,
                PrintCapabilities = printQueue.GetPrintCapabilitiesAsXDocument()
            };

            return(result);
        }