Exemple #1
0
 public override T DeserializeFromStream <T>(Stream stream)
 {
     using (var reader = new StreamReader(stream))
     {
         return(TypeSerializer.DeserializeFromReader <T>(reader));
     }
 }
 protected override TTestObject Deserialize()
 {
     base.MemoryStream.Position = 0;
     return(serializer.DeserializeFromReader(this.streamReader));
 }
Exemple #3
0
 protected override T Deserialize()
 {
     base.SerializedResult.Position = 0;
     _streamReader = new StreamReader(base.SerializedResult);
     return(_serializer.DeserializeFromReader(_streamReader));
 }
Exemple #4
0
        private void Load(Stream stream)
        {
            //var reader = new SoapFormatter();
            var reader = new TypeSerializer<SystemConfig>();
            var streamReader = new StreamReader(stream);
            SystemConfig config = reader.DeserializeFromReader(streamReader);

            var mapper = EmitMapper.ObjectMapperManager.DefaultInstance.GetMapper<SystemConfig, SystemConfig>();
            mapper.Map(config, this);
        }