/// <exception cref="XmlException">XML is not well-formed.</exception>
        internal override sealed bool OptionPropCallback(PrintCapabilityOption baseOption, XmlPrintCapReader reader)
        {
            NUpOption option  = baseOption as NUpOption;
            bool      handled = false;

            // we are only handling scored property here
            if (reader.CurrentElementNodeType == PrintSchemaNodeTypes.ScoredProperty)
            {
                if (reader.CurrentElementNameAttrValue == PrintSchemaTags.Keywords.NUpKeys.PagesPerSheet)
                {
                    try
                    {
                        option._pagesPerSheet = reader.GetCurrentPropertyIntValueWithException();
                    }
                    // We want to catch internal FormatException to skip recoverable XML content syntax error
                    #pragma warning suppress 56502
                    #if _DEBUG
                    catch (FormatException e)
                    #else
                    catch (FormatException)
                    #endif
                    {
                        #if _DEBUG
                        Trace.WriteLine("-Error- " + e.Message);
                        #endif
                    }

                    handled = true;
                }
            }

            return(handled);
        }
        internal override sealed bool AddOptionCallback(PrintCapabilityOption baseOption)
        {
            bool added = false;

            NUpOption option = baseOption as NUpOption;

            // validate the option is complete before adding it to the collection
            if (option.PagesPerSheet > 0)
            {
                this.NUps.Add(option);
                added = true;
            }

            return(added);
        }
        internal override sealed PrintCapabilityOption NewOptionCallback(PrintCapabilityFeature baseFeature)
        {
            NUpOption option = new NUpOption(baseFeature);

            return(option);
        }