public bool Read(out IOperation operation) { using (var file = olFile.GetStream()) { operation = serializer.Deserialize(file); } return(operation != null); }
public bool Read(out IOperation operation) { operation = null; using (var stream = olFile.GetStream()) { stream.Seek(readOffset, SeekOrigin.Begin); try { var read = serializer.Deserialize(stream); operation = read; readOffset += (int)stream.Position; return(true); } catch (Exception e) { return(false); } } }