- Timestamp:
- 01/02/19 16:07:07 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2520_PersistenceReintegration/HeuristicLab.Scripting/3.3/VariableStore.cs
r16462 r16480 81 81 protected T CloneByPersistence<T>(T value) { 82 82 using (var serializerStream = new MemoryStream()) { 83 XmlGenerator.Serialize(value, serializerStream); 83 var serializer = new ProtoBufSerializer(); 84 serializer.Serialize(value, serializerStream, disposeStream: false); 84 85 var bytes = serializerStream.GetBuffer(); 85 86 using (var deserializerStream = new MemoryStream(bytes)) { 86 return XmlParser.Deserialize<T>(deserializerStream);87 return (T)serializer.Deserialize(deserializerStream); 87 88 } 88 89 }
Note: See TracChangeset
for help on using the changeset viewer.