annotate Implab/Xml/XmlDefaultSerializer.cs @ 280:f07be402ab02 v3

Added Trace<T>.Debug(...) method for debug messages Added ContainerBuilde.LoadConfig(Uri) method
author cin
date Fri, 25 May 2018 19:15:26 +0300
parents 6691aff01de1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
278
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
1 using System.Xml.Serialization;
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
2 using Implab.Components;
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
3
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
4 namespace Implab.Xml {
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
5 /// <summary>
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
6 /// This class used to get default serializer for the specified type <typeparamref name="T"/>.
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
7 /// </summary>
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
8 /// <typeparam name="T">The type used to create <see cref="XmlSerializer"/></typeparam>
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
9 public static class XmlDefaultSerializer<T> {
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
10 static readonly LazyAndWeak<XmlSerializer> m_instance = new LazyAndWeak<XmlSerializer>(() => new XmlSerializer(typeof(T)));
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
11
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
12 public static XmlSerializer Instance { get { return m_instance.Value; } }
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
13 }
6691aff01de1 Implab: added XmlDefaultSeializer (SerializersPool is now obsolete)
cin
parents:
diff changeset
14 }