System.Xml.Serialization.XmlReflectionImporter.IncludeType C# (CSharp) Method

IncludeType() public method

public IncludeType ( Type type ) : void
type System.Type
return void
        public void IncludeType(Type type)
        {
            IncludeType(type, new RecursionLimiter());
        }

Same methods

XmlReflectionImporter::IncludeType ( Type type, RecursionLimiter limiter ) : void

Usage Example

Example #1
0
        /// <include file='doc\XmlSerializer.uex' path='docs/doc[@for="XmlSerializer.XmlSerializer7"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        public XmlSerializer(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace, string location)
        {
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }

            DefaultNamespace = defaultNamespace;
            rootType         = type;
            XmlReflectionImporter importer = new XmlReflectionImporter(overrides, defaultNamespace);

            if (extraTypes != null)
            {
                for (int i = 0; i < extraTypes.Length; i++)
                {
                    importer.IncludeType(extraTypes[i]);
                }
            }
            _mapping = importer.ImportTypeMapping(type, root, defaultNamespace);
            if (location != null)
            {
                DemandForUserLocationOrEvidence();
            }

#if !NET_NATIVE
            _tempAssembly = GenerateTempAssembly(_mapping, type, defaultNamespace, location);
#endif
        }
All Usage Examples Of System.Xml.Serialization.XmlReflectionImporter::IncludeType