diff options
| author | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
|---|---|---|
| committer | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
| commit | 48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch) | |
| tree | 8dae77a31670a888d733484cb17dd4077d5444e8 /Mono.Nat/AsyncResults/AsyncResult.cs | |
| parent | c32d8656382a0eacb301692e0084377fc433ae9b (diff) | |
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'Mono.Nat/AsyncResults/AsyncResult.cs')
| -rw-r--r-- | Mono.Nat/AsyncResults/AsyncResult.cs | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/Mono.Nat/AsyncResults/AsyncResult.cs b/Mono.Nat/AsyncResults/AsyncResult.cs deleted file mode 100644 index e98e7d7ca..000000000 --- a/Mono.Nat/AsyncResults/AsyncResult.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; - -namespace Mono.Nat -{ - internal class AsyncResult : IAsyncResult - { - private object asyncState; - private AsyncCallback callback; - private bool completedSynchronously; - private bool isCompleted; - private Exception storedException; - private ManualResetEvent waitHandle; - - public AsyncResult(AsyncCallback callback, object asyncState) - { - this.callback = callback; - this.asyncState = asyncState; - waitHandle = new ManualResetEvent(false); - } - - public object AsyncState - { - get { return asyncState; } - } - - public ManualResetEvent AsyncWaitHandle - { - get { return waitHandle; } - } - - WaitHandle IAsyncResult.AsyncWaitHandle - { - get { return waitHandle; } - } - - public bool CompletedSynchronously - { - get { return completedSynchronously; } - protected internal set { completedSynchronously = value; } - } - - public bool IsCompleted - { - get { return isCompleted; } - protected internal set { isCompleted = value; } - } - - public Exception StoredException - { - get { return storedException; } - } - - public void Complete() - { - Complete(storedException); - } - - public void Complete(Exception ex) - { - storedException = ex; - isCompleted = true; - waitHandle.Set(); - - if (callback != null) - callback(this); - } - } -} |
