예제 #1
0
        internal override sealed bool AddOptionCallback(PrintCapabilityOption baseOption)
        {
            bool added = false;

            MediaTypeOption option = baseOption as MediaTypeOption;

            // validate the option is complete before adding it to the collection
            if (option._optionName != null)
            {
                int enumValue = PrintSchemaMapper.SchemaNameToEnumValueWithArray(
                    PrintSchemaTags.Keywords.PageMediaTypeKeys.MediaTypeNames,
                    PrintSchemaTags.Keywords.PageMediaTypeKeys.MediaTypeEnums,
                    option._optionName);

                if (enumValue > 0)
                {
                    option._value = (PageMediaType)enumValue;
                    this.MediaTypes.Add(option);
                    added = true;
                }
            }

            return(added);
        }
예제 #2
0
        internal override sealed PrintCapabilityOption NewOptionCallback(PrintCapabilityFeature baseFeature)
        {
            MediaTypeOption option = new MediaTypeOption(baseFeature);

            return(option);
        }