Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/11/17 17:46:11 (6 years ago)
Author:
jkarder
Message:

#2520: worked on new persistence

  • changed message definitions
  • updated transformers
  • cleaned up
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/ProtoBufSerializer.cs

    r13367 r15509  
    2121
    2222using System.IO;
     23using Google.Protobuf;
    2324
    2425namespace HeuristicLab.Persistence {
    2526  public sealed class ProtoBufSerializer : Serializer {
    2627    protected override void SerializeBundle(Bundle bundle, Stream stream) {
    27       bundle.WriteTo(stream);
     28      using (var outputStream = new CodedOutputStream(stream))
     29        bundle.WriteTo(outputStream);
    2830    }
    2931
    3032    protected override Bundle DeserializeBundle(Stream stream) {
    31       return Bundle.ParseFrom(stream, Mapper.StaticCache.GetExtensionRegistry());
     33      using (var inputStream = new CodedInputStream(stream))
     34        return Bundle.Parser.ParseFrom(inputStream);
    3235    }
    3336  }
Note: See TracChangeset for help on using the changeset viewer.