public void MakeSnapshot() { var snapshot = _shapes.Adapt <CanvasState>(); snapshot.CanvasSize = _canvasOperationService.CanvasSize.Adapt <SizeInfo>(); var snapshotBytes = _binarySerializer.Serialize(snapshot); var snapshotBytesCompressed = _byteCompressor.Compress(snapshotBytes); CanvasHistory.Push(snapshotBytesCompressed); OnCanvasHistoryChanged(CanvasHistory.Count); }