28 |
|
BinaryFormatter bin = new BinaryFormatter(); |
29 |
|
bin.Serialize(stream, data); |
30 |
|
} |
31 |
< |
catch (Exception ex) { xmltv_logger.Log.Error.WriteLine(ex.ToString()); return false; } |
31 |
> |
catch (Exception ex) { xmltv_logger.Error.WriteLine(ex.ToString()); return false; } |
32 |
|
return true; |
33 |
|
} |
34 |
|
public T DeSerialize(string file, out bool status) |
45 |
|
BinaryFormatter bin = new BinaryFormatter(); |
46 |
|
unpacked_data = (T)bin.Deserialize(stream); |
47 |
|
} |
48 |
< |
catch (Exception ex) { xmltv_logger.Log.Error.WriteLine(ex.ToString()); status = false; } |
48 |
> |
catch (Exception ex) { xmltv_logger.Error.WriteLine(ex.ToString()); status = false; } |
49 |
|
status = true; |
50 |
|
return unpacked_data; |
51 |
|
} |