Skip to content

Commit

Permalink
Fix sample (#18332)
Browse files Browse the repository at this point in the history
* Fix sample

* Fix
  • Loading branch information
JoshLove-msft authored Feb 1, 2021
1 parent 786e0af commit dfabad3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ foreach (CloudEvent cloudEvent in cloudEvents)
}
```

### Using `GetData()`
If expecting mostly system events, it may be cleaner to switch on object `GetData()` and use pattern matching to deserialize events. In the case where there are unrecognized event types, one can use the returned `BinaryData` to deserialize the custom event data.
### Using `AsSytemEventData()`
If expecting mostly system events, it may be cleaner to switch on `AsSytemEventData()` and use pattern matching to act on the individual events. In the case where there are unrecognized event types, one can use the returned `BinaryData` to examine the event data.

```C# Snippet:DeserializePayloadUsingAsSystemEventData
foreach (EventGridEvent egEvent in egEvents)
Expand Down

0 comments on commit dfabad3

Please sign in to comment.