File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ public class Bar : IInitializable, IDisposable
5151
5252 public void Initialize ()
5353 {
54- if (! asycFoo .TryGetResult (out _foo ))
54+ if (! _asyncFoo .TryGetResult (out _foo ))
5555 {
56- asycFoo .Completed += OnFooReady ;
56+ _asyncFoo .Completed += OnFooReady ;
5757 }
5858 }
5959
@@ -64,7 +64,7 @@ public class Bar : IInitializable, IDisposable
6464
6565 public void Dispose ()
6666 {
67- asycFoo .Completed -= OnFooReady ;
67+ _asyncFoo .Completed -= OnFooReady ;
6868 }
6969}
7070```
@@ -78,12 +78,12 @@ Once injected to `Bar`, we can check whether the return value of the async opera
7878Alternatively we can use following methods to check result.
7979``` csharp
8080// Use HasResult to check if result exists
81- if (asycFoo .HasResult )
81+ if (_asyncFoo .HasResult )
8282{
8383 // Result will throw error if prematurely used.
84- var foo = asycFoo .Result ;
84+ var foo = _asyncFoo .Result ;
8585}
8686
8787// AsyncInject<T> provides custom awaiter
88- IFoo foo = await asyncFoo ;
88+ IFoo foo = await _asyncFoo ;
8989```
You can’t perform that action at this time.
0 commit comments