mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 13:33:13 +00:00
Static Calling
This commit is contained in:
@ -90,6 +90,16 @@ public class AsyncReply
|
||||
return result;
|
||||
}
|
||||
|
||||
public AsyncReply Timeout(int milliseconds, Action callback)
|
||||
{
|
||||
Task.Delay(milliseconds).ContinueWith(x =>
|
||||
{
|
||||
if (!resultReady && exception == null)
|
||||
callback();
|
||||
});
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public object Wait(int millisecondsTimeout)
|
||||
{
|
||||
|
Reference in New Issue
Block a user