public RavenJToken WaitForCompletion() { if (done) { return(state); } if (client == null) { throw new InvalidOperationException("Cannot use WaitForCompletion() when the operation was executed asyncronously"); } while (true) { var status = client.GetOperationStatus(id); if (status == null) { return(null); } if (status.Value <bool>("Completed")) { return(status.Value <RavenJToken>("State")); } Thread.Sleep(500); } }
public RavenJToken WaitForCompletion() { if (client == null) { return(state); } while (true) { var status = client.GetOperationStatus(id); if (status == null) { return(null); } if (status.Value <bool>("Completed")) { return(status.Value <RavenJToken>("State")); } Thread.Sleep(500); } }