Skip to content

Commit 713f974

Browse files
authored
[EventGrid] Fix the README codesnippet misplacement (Azure#28188)
1 parent 2b882d6 commit 713f974

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

sdk/eventgrid/azure-messaging-eventgrid/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Release History
22

3-
## 4.11.0 (2022-04-08)
3+
## 4.11.0 (2022-04-12)
44

55
### Features Added
66
- Added system event classes for Azure Healthcare FHIR Services under package `com.azure.messaging.eventgrid.systemevents`,

sdk/eventgrid/azure-messaging-eventgrid/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,16 @@ the synchronous client is used for samples, however the asynchronous client has
283283
Note: figure out what schema (cloud event, event grid event, or custom event) the event grid topic accepts before you start sending.
284284
#### Sending `EventGridEvent` to a topic that accepts EventGridEvent schema
285285

286+
```java readme-sample-sendEventGridEventsToTopic
287+
// Make sure that the event grid topic or domain you're sending to is able to accept the EventGridEvent schema.
288+
List<EventGridEvent> events = new ArrayList<>();
289+
User user = new User("John", "James");
290+
events.add(new EventGridEvent("exampleSubject", "Com.Example.ExampleEventType", BinaryData.fromObject(user), "0.1"));
291+
eventGridEventClient.sendEvents(events);
292+
```
293+
294+
#### Sending `CloudEvent` to a topic that accepts CloudEvent schema
295+
286296
```java readme-sample-sendCloudEventsToTopic
287297
// Make sure that the event grid topic or domain you're sending to is able to accept the CloudEvent schema.
288298
List<CloudEvent> events = new ArrayList<>();
@@ -292,16 +302,6 @@ events.add(new CloudEvent("https://source.example.com", "Com.Example.ExampleEven
292302
cloudEventClient.sendEvents(events);
293303
```
294304

295-
#### Sending `CloudEvent` to a topic that accepts CloudEvent schema
296-
297-
```java readme-sample-sendEventGridEventsToTopic
298-
// Make sure that the event grid topic or domain you're sending to is able to accept the EventGridEvent schema.
299-
List<EventGridEvent> events = new ArrayList<>();
300-
User user = new User("John", "James");
301-
events.add(new EventGridEvent("exampleSubject", "Com.Example.ExampleEventType", BinaryData.fromObject(user), "0.1"));
302-
eventGridEventClient.sendEvents(events);
303-
```
304-
305305
#### Sending Custom Events to a topic that accepts custom event schema
306306

307307
```java readme-sample-sendCustomEventsToTopic

0 commit comments

Comments
 (0)