public void ReadDynamicTravelTest() { var bytes = SerializationTestContext.GetFilledDataBlockBlob(); var stream = new MemoryStream(bytes); var visitor = new PackedDataReadVisitor(stream); var context = new DynamicTravellerContext(); var traveller = context.GetInstance<DataBlock>(); var graph = new DataBlock(); traveller.Travel(visitor, graph); var expected = DataBlock.Filled(); AssertAreEqual(expected, graph); }
public void ReadDynamicTravelTest() { var bytes = BinarySerializationTestContext.GetFilledDataBlockBlob(); var stream = new MemoryStream(bytes); var visitor = new PackedDataReadVisitor(stream); var context = new DynamicTravellerContext(); var traveller = context.GetInstance <DataBlock>(); var graph = new DataBlock(); traveller.Travel(visitor, graph); var expected = DataBlock.Filled(); graph.AssertEqualTo(expected); }
public IGraphTraveller <T> CreateTraveller <T>() { var traveller = _travellerContext.GetInstance <T>(); return(traveller); }
public GraphTravellerCollection(DynamicTravellerContext context, IVisitArgsFactory visitArgsFactory) : this(t => context.GetInstance(t, visitArgsFactory)) { }
public GraphTravellerCollection(DynamicTravellerContext context) : this(t => context.GetInstance(t)) { }