From 8796c0e8c375857cf2768cad03b488e159f03164 Mon Sep 17 00:00:00 2001
From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Date: Mon, 30 Nov 2020 11:23:52 -0800
Subject: [PATCH 1/4] CloudNative.CloudEvents bridge library
---
eng/Packages.Data.props | 1 +
...zure.Messaging.EventGrid.netstandard2.0.cs | 4 +
.../Customization/EventGridPublisherClient.cs | 142 +++++++++++++-----
.../CHANGELOG.md | 7 +
.../Directory.Build.props | 7 +
.../README.md | 49 ++++++
...ve.CloudEvents.EventGrid.netstandard2.0.cs | 8 +
.../src/EventGridPublisherClientExtensions.cs | 101 +++++++++++++
...e.CloudNative.CloudEvents.EventGrid.csproj | 21 +++
.../tests/CloudEventTests.cs | 137 +++++++++++++++++
.../tests/CloudNativeLiveTests.cs | 64 ++++++++
...dNative.CloudEvents.EventGrid.Tests.csproj | 23 +++
.../CanPublishCloudEvent.json | 37 +++++
.../CanPublishCloudEventAsync.json | 37 +++++
14 files changed, 597 insertions(+), 41 deletions(-)
create mode 100644 sdk/eventgrid/Microsoft.Azure.CloudNative.CloudEvents.EventGrid/CHANGELOG.md
create mode 100644 sdk/eventgrid/Microsoft.Azure.CloudNative.CloudEvents.EventGrid/Directory.Build.props
create mode 100644 sdk/eventgrid/Microsoft.Azure.CloudNative.CloudEvents.EventGrid/README.md
create mode 100644 sdk/eventgrid/Microsoft.Azure.CloudNative.CloudEvents.EventGrid/api/Microsoft.Azure.CloudNative.CloudEvents.EventGrid.netstandard2.0.cs
create mode 100644 sdk/eventgrid/Microsoft.Azure.CloudNative.CloudEvents.EventGrid/src/EventGridPublisherClientExtensions.cs
create mode 100644 sdk/eventgrid/Microsoft.Azure.CloudNative.CloudEvents.EventGrid/src/Microsoft.Azure.CloudNative.CloudEvents.EventGrid.csproj
create mode 100644 sdk/eventgrid/Microsoft.Azure.CloudNative.CloudEvents.EventGrid/tests/CloudEventTests.cs
create mode 100644 sdk/eventgrid/Microsoft.Azure.CloudNative.CloudEvents.EventGrid/tests/CloudNativeLiveTests.cs
create mode 100644 sdk/eventgrid/Microsoft.Azure.CloudNative.CloudEvents.EventGrid/tests/Microsoft.Azure.CloudNative.CloudEvents.EventGrid.Tests.csproj
create mode 100644 sdk/eventgrid/Microsoft.Azure.CloudNative.CloudEvents.EventGrid/tests/SessionRecords/CloudNativeLiveTests/CanPublishCloudEvent.json
create mode 100644 sdk/eventgrid/Microsoft.Azure.CloudNative.CloudEvents.EventGrid/tests/SessionRecords/CloudNativeLiveTests/CanPublishCloudEventAsync.json
diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props
index 7cef773fe2789..39cb864836ae5 100644
--- a/eng/Packages.Data.props
+++ b/eng/Packages.Data.props
@@ -32,6 +32,7 @@
+
diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs
index 52dba42fda0a7..33bf6722ffe1a 100644
--- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs
+++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs
@@ -49,6 +49,10 @@ public EventGridPublisherClient(System.Uri endpoint, Azure.AzureKeyCredential cr
public EventGridPublisherClient(System.Uri endpoint, Azure.Messaging.EventGrid.EventGridSharedAccessSignatureCredential credential) { }
public EventGridPublisherClient(System.Uri endpoint, Azure.Messaging.EventGrid.EventGridSharedAccessSignatureCredential credential, Azure.Messaging.EventGrid.EventGridPublisherClientOptions options) { }
public static string BuildSharedAccessSignature(System.Uri endpoint, System.DateTimeOffset expirationUtc, Azure.AzureKeyCredential key, Azure.Messaging.EventGrid.EventGridPublisherClientOptions.ServiceVersion apiVersion = Azure.Messaging.EventGrid.EventGridPublisherClientOptions.ServiceVersion.V2018_01_01) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public virtual Azure.Response SendEncodedCloudEvents(System.ReadOnlyMemory cloudEvents, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public virtual System.Threading.Tasks.Task SendEncodedCloudEventsAsync(System.ReadOnlyMemory cloudEvents, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response SendEvents(System.Collections.Generic.IEnumerable events, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response SendEvents(System.Collections.Generic.IEnumerable events, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response SendEvents(System.Collections.Generic.IEnumerable