Skip to content

Commit

Permalink
[EventGrid] Fix the README codesnippet misplacement (Azure#28188)
Browse files Browse the repository at this point in the history
  • Loading branch information
mssfang authored Apr 12, 2022
1 parent 2b882d6 commit 713f974
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion sdk/eventgrid/azure-messaging-eventgrid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 4.11.0 (2022-04-08)
## 4.11.0 (2022-04-12)

### Features Added
- Added system event classes for Azure Healthcare FHIR Services under package `com.azure.messaging.eventgrid.systemevents`,
Expand Down
20 changes: 10 additions & 10 deletions sdk/eventgrid/azure-messaging-eventgrid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,16 @@ the synchronous client is used for samples, however the asynchronous client has
Note: figure out what schema (cloud event, event grid event, or custom event) the event grid topic accepts before you start sending.
#### Sending `EventGridEvent` to a topic that accepts EventGridEvent schema

```java readme-sample-sendEventGridEventsToTopic
// Make sure that the event grid topic or domain you're sending to is able to accept the EventGridEvent schema.
List<EventGridEvent> events = new ArrayList<>();
User user = new User("John", "James");
events.add(new EventGridEvent("exampleSubject", "Com.Example.ExampleEventType", BinaryData.fromObject(user), "0.1"));
eventGridEventClient.sendEvents(events);
```

#### Sending `CloudEvent` to a topic that accepts CloudEvent schema

```java readme-sample-sendCloudEventsToTopic
// Make sure that the event grid topic or domain you're sending to is able to accept the CloudEvent schema.
List<CloudEvent> events = new ArrayList<>();
Expand All @@ -292,16 +302,6 @@ events.add(new CloudEvent("https://source.example.com", "Com.Example.ExampleEven
cloudEventClient.sendEvents(events);
```

#### Sending `CloudEvent` to a topic that accepts CloudEvent schema

```java readme-sample-sendEventGridEventsToTopic
// Make sure that the event grid topic or domain you're sending to is able to accept the EventGridEvent schema.
List<EventGridEvent> events = new ArrayList<>();
User user = new User("John", "James");
events.add(new EventGridEvent("exampleSubject", "Com.Example.ExampleEventType", BinaryData.fromObject(user), "0.1"));
eventGridEventClient.sendEvents(events);
```

#### Sending Custom Events to a topic that accepts custom event schema

```java readme-sample-sendCustomEventsToTopic
Expand Down

0 comments on commit 713f974

Please sign in to comment.