Skip to content

Commit bfec241

Browse files
Update async operation pattern to *LastResult in style guide
1 parent 243334d commit bfec241

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

STYLE_GUIDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ complexity, especially when part of it is reflected in external code:
279279
### Application Initiated Async Operations
280280
281281
* Use the Future / State Pattern.
282-
* Add a `*Result()` method for each async operation method to allow the caller
282+
* Add a `*LastResult()` method for each async operation method to allow the caller
283283
to poll and not save state.
284284
285285
e.g.
@@ -288,7 +288,7 @@ e.g.
288288
// Start async operation.
289289
Future<SignInWithCrendentialResult> SignInWithCredential(...);
290290
// Get the result of the pending / last async operation for the method.
291-
Future<SignInWithCrendentialResult> GetSignInWithCredentialResult();
291+
Future<SignInWithCrendentialResult> SignInWithCredentialLastResult();
292292
293293
Usage examples:
294294
// call and register callback
@@ -304,7 +304,7 @@ e.g.
304304
305305
// call and poll #2 (result stored in API)
306306
SignInWithCredential();
307-
while (GetSignInWithCredentialResult().value() != kComplete) {
307+
while (SignInWithCredentialLastResult().value() != kComplete) {
308308
}
309309
```
310310

0 commit comments

Comments
 (0)