Skip to content

Commit 73eed41

Browse files
altunsercanMathijs-Bakker
authored andcommitted
Update _asyncFoo variable naming in documentation
1 parent 8b8b8bc commit 73eed41

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Documentation/Async.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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
7878
Alternatively 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
```

0 commit comments

Comments
 (0)