Innovt Platform
Search Results for

    Show / Hide Table of Contents

    Class XmlSerializer

    Provides XML serialization and deserialization using System.Xml.Serialization.

    Inheritance
    object
    XmlSerializer
    Implements
    ISerializer
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Innovt.Core.Serialization
    Assembly: Innovt.Core.dll
    Syntax
    public class XmlSerializer : ISerializer

    Methods

    | Edit this page View Source

    DeserializeObject<T>(string)

    Deserializes an XML string into an object of type T.

    Declaration
    public T DeserializeObject<T>(string serializedObject)
    Parameters
    Type Name Description
    string serializedObject

    The XML string to deserialize.

    Returns
    Type Description
    T

    The deserialized object of type T.

    Type Parameters
    Name Description
    T

    The type of object to deserialize.

    | Edit this page View Source

    SerializeObject<T>(T)

    Serializes an object of type T into an XML string.

    Declaration
    public string SerializeObject<T>(T obj)
    Parameters
    Type Name Description
    T obj

    The object to serialize.

    Returns
    Type Description
    string

    The serialized object as an XML string.

    Type Parameters
    Name Description
    T

    The type of object to serialize.

    | Edit this page View Source

    SerializeObject<T>(T, Dictionary<string, string>)

    Serializes an object of type T into an XML string with optional namespaces.

    Declaration
    public string SerializeObject<T>(T obj, Dictionary<string, string> namespaces)
    Parameters
    Type Name Description
    T obj

    The object to serialize.

    Dictionary<string, string> namespaces

    A dictionary of namespaces to include in the XML serialization.

    Returns
    Type Description
    string

    The serialized object as an XML string.

    Type Parameters
    Name Description
    T

    The type of object to serialize.

    Exceptions
    Type Condition
    Exception

    Thrown when there is an XML serialization error.

    Implements

    ISerializer

    Extension Methods

    Extensions.IsNull(object)
    Extensions.ToStringOrDefault(object)
    SimpleMapper.MapTo<T1>(object)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX