Example #1
0
        ///-------------------------------------------------------------------------------------------------
        /// <summary>
        ///  Deserialize a domain in xml
        /// </summary>
        /// <param name="stream">
        ///  The stream.
        /// </param>
        /// <param name="domain">
        ///  The domain.
        /// </param>
        /// <param name="settings">
        ///  Options for controlling the operation.
        /// </param>
        ///-------------------------------------------------------------------------------------------------
        public static void Deserialize(Stream stream, IDomainModel domain, XmlDeserializationSettings settings = null)
        {
            Contract.Requires(domain, "domain");
            var ser = new XmlDeserializer(domain, settings);

            ser.Deserialize(stream);
        }
Example #2
0
 private XmlDeserializer(IDomainModel domain, XmlDeserializationSettings settings)
 {
     _domain = domain;
     if (settings != null)
     {
         _serializer             = settings.Serializer;
         _schema                 = settings.Schema;
         _allowElementOverriding = settings.AllowElementOverriding;
     }
 }