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)); }
protected override T Deserialize() { base.SerializedResult.Position = 0; _streamReader = new StreamReader(base.SerializedResult); return(_serializer.DeserializeFromReader(_streamReader)); }
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); }