Mercurial > pub > ImplabNet
view Implab/Xml/XmlDefaultSerializer.cs @ 281:e0916ddc9950 v3 tip
code cleanup and refactoring
author | cin |
---|---|
date | Fri, 01 Jun 2018 21:35:24 +0300 |
parents | 6691aff01de1 |
children |
line wrap: on
line source
using System.Xml.Serialization; using Implab.Components; namespace Implab.Xml { /// <summary> /// This class used to get default serializer for the specified type <typeparamref name="T"/>. /// </summary> /// <typeparam name="T">The type used to create <see cref="XmlSerializer"/></typeparam> public static class XmlDefaultSerializer<T> { static readonly LazyAndWeak<XmlSerializer> m_instance = new LazyAndWeak<XmlSerializer>(() => new XmlSerializer(typeof(T))); public static XmlSerializer Instance { get { return m_instance.Value; } } } }