DictionarySegment <DefaultResolver, int, string> CreateFresh() { ILazyDictionary <int, string> sampleDict = new Dictionary <int, string>() { { 1234, "aaaa" }, { -1, "mainasu" }, { -42432, "more mainasu" }, { 99999, "plus plus" } }.AsLazyDictionary(); var bytes = ZeroFormatterSerializer.Serialize(sampleDict); int _; return(DictionarySegment <DefaultResolver, int, string> .Create(new DirtyTracker(), bytes, 0, out _)); }
public override ILazyReadOnlyDictionary <TKey, TValue> Deserialize(ref byte[] bytes, int offset, DirtyTracker tracker, out int byteSize) { return(DictionarySegment <TKey, TValue> .Create(tracker, bytes, offset, out byteSize)); }