Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (37 sloc) 0.818 kB
using System;
using System.Threading;
namespace Kudu.SiteManagement
{
internal class PollingWait
{
private readonly Action _action;
private readonly Func<bool> _isComplete;
public PollingWait(Action action, Func<bool> isComplete)
{
_action = action;
_isComplete = isComplete;
}
public bool IsComplete
{
get
{
try
{
return _isComplete();
}
catch
{
return false;
}
}
}
public void Invoke()
{
_action();
while (!IsComplete)
{
Thread.Sleep(500);
}
}
}
}
Jump to Line
Something went wrong with that request. Please try again.