Skip to content

Commit dfabad3

Browse files
Fix sample (#18332)
* Fix sample * Fix
1 parent 786e0af commit dfabad3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk/eventgrid/Azure.Messaging.EventGrid/samples/Sample3_ParseAndDeserializeEvents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ foreach (CloudEvent cloudEvent in cloudEvents)
5252
}
5353
```
5454

55-
### Using `GetData()`
56-
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.
55+
### Using `AsSytemEventData()`
56+
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.
5757

5858
```C# Snippet:DeserializePayloadUsingAsSystemEventData
5959
foreach (EventGridEvent egEvent in egEvents)

0 commit comments

Comments
 (0)