BinaryDataLoadSaveTests SaveAndLoadRange Method Delta Engine Documentation

Namespace: DeltaEngine.Tests.Core
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void SaveAndLoadRange()
Examples

[Test]
public void SaveAndLoadRange()
{
    var range = new Range<Vector2D>(Vector2D.Zero, new Vector2D(3.0f, 3.0f));
    var data = BinaryDataExtensions.SaveDataIntoMemoryStream(range);
    var output =
        BinaryDataExtensions.LoadDataWithKnownTypeFromMemoryStream<Range<Vector2D>>(data);
    Assert.AreEqual(range.Start, output.Start);
    Assert.AreEqual(range.End, output.End);
}
See Also