public void Push(IEnumerable <TOperation> operations) { using (Probe.Create($"Send {typeof(TOperation).Name}")) { var transportMessages = operations.Select(operation => _serializer.Serialize(operation, _targetFlow)); Save(transportMessages.ToArray()); } }
public void Write(IOperation operation) { var data = serializer.Serialize(operation); using (var file = olFile.GetStream()) { file.Seek(file.Length, SeekOrigin.Current); file.Write(data, 0, data.Length); } }
public bool AddStep(string type, object opDescription) { IOperationSerializer ser = null; ser = CreateSerializer(type); _steps.Add(ser.Serialize(opDescription)); return(true); }
public void Write(IOperation operation) { using (var stream = olFile.GetStream()) { var serializedOperation = serializer.Serialize(operation); stream.Seek(writeOffset, SeekOrigin.Begin); stream.Write(serializedOperation, 0, serializedOperation.Length); writeOffset += serializedOperation.Length; } }