コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
            }
        }