Mercurial > pub > ImplabNet
comparison Implab/Xml/XmlDefaultSerializer.cs @ 278:6691aff01de1 v3
Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
Implab.ServiceHost: rewritten TypeReference (added support for nested types), stable API
author | cin |
---|---|
date | Thu, 03 May 2018 09:59:44 +0300 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
277:963b17c275be | 278:6691aff01de1 |
---|---|
1 using System.Xml.Serialization; | |
2 using Implab.Components; | |
3 | |
4 namespace Implab.Xml { | |
5 /// <summary> | |
6 /// This class used to get default serializer for the specified type <typeparamref name="T"/>. | |
7 /// </summary> | |
8 /// <typeparam name="T">The type used to create <see cref="XmlSerializer"/></typeparam> | |
9 public static class XmlDefaultSerializer<T> { | |
10 static readonly LazyAndWeak<XmlSerializer> m_instance = new LazyAndWeak<XmlSerializer>(() => new XmlSerializer(typeof(T))); | |
11 | |
12 public static XmlSerializer Instance { get { return m_instance.Value; } } | |
13 } | |
14 } |