예제 #1
0
 public bool Read(out IOperation operation)
 {
     using (var file = olFile.GetStream())
     {
         operation = serializer.Deserialize(file);
     }
     return(operation != null);
 }
예제 #2
0
 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);
         }
     }
 }