System.Xml.Serialization.XmlSerializer.GenerateTempAssembly C# (CSharp) Method

GenerateTempAssembly() static private method

static private GenerateTempAssembly ( XmlMapping xmlMapping ) : TempAssembly
xmlMapping XmlMapping
return TempAssembly
        internal static TempAssembly GenerateTempAssembly(XmlMapping xmlMapping)
        {
            return GenerateTempAssembly(xmlMapping, null, null);
        }

Same methods

XmlSerializer::GenerateTempAssembly ( XmlMapping xmlMapping, Type type, string defaultNamespace ) : TempAssembly
XmlSerializer::GenerateTempAssembly ( XmlMapping xmlMapping, Type type, string defaultNamespace, string location ) : TempAssembly

Usage Example

        public XmlSerializer CreateSerializer(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace, string location, Evidence evidence)
        {
            if (type == null)
            {
                throw new ArgumentNullException("type");
            }
            XmlReflectionImporter importer = new XmlReflectionImporter(overrides, defaultNamespace);

            for (int i = 0; i < extraTypes.Length; i++)
            {
                importer.IncludeType(extraTypes[i]);
            }
            XmlTypeMapping xmlMapping = importer.ImportTypeMapping(type, root, defaultNamespace);

            return((XmlSerializer)XmlSerializer.GenerateTempAssembly(xmlMapping, type, defaultNamespace, location, evidence).Contract.TypedSerializers[xmlMapping.Key]);
        }
All Usage Examples Of System.Xml.Serialization.XmlSerializer::GenerateTempAssembly