Exemplo n.º 1
0
        public void Serialize(InputArchive archive, ref Array value)
        {
            List <T> list = new List <T>();

            archive.SerializeCollection(null, list);
            value = list.ToArray();
        }
        public void Serialize(InputArchive archive, ref KeyValuePair <K, V> value)
        {
            K value2 = default(K);
            V value3 = default(V);

            archive.Serialize("K", ref value2);
            archive.Serialize("V", ref value3);
            value = new KeyValuePair <K, V>(value2, value3);
        }
Exemplo n.º 3
0
        public void Serialize(InputArchive archive, ref XElement value)
        {
            XmlInputArchive xmlInputArchive = archive as XmlInputArchive;

            if (xmlInputArchive != null)
            {
                value = xmlInputArchive.Node.Elements().First();
                return;
            }
            string value2 = null;

            archive.Serialize(null, ref value2);
            value = XElement.Parse(value2);
        }
Exemplo n.º 4
0
 public void Serialize(InputArchive archive, ref Guid value)
 {
     byte[] value2 = null;
     archive.Serialize(null, 16, ref value2);
     value = new Guid(value2);
 }
Exemplo n.º 5
0
 public void Serialize(InputArchive archive, ref Dictionary <K, V> value)
 {
     value = new Dictionary <K, V>();
     archive.SerializeDictionary(null, value);
 }
Exemplo n.º 6
0
 public void Serialize(InputArchive archive, ref HashSet <T> value)
 {
     value = new HashSet <T>();
     archive.SerializeCollection(null, value);
 }
 public void Serialize(InputArchive archive, ref SortedDictionary <K, V> value)
 {
     value = new SortedDictionary <K, V>();
     archive.SerializeDictionary(null, (IDictionary <K, V>)value);
 }