Skip to content

Conversation

@v-yilinhu
Copy link

@v-yilinhu v-yilinhu commented May 17, 2022

  1. Update EventGrid SDK to T2

  2. Update files:

    • ../src/Blazor.EventGridViewer.Core/Blazor.EventGridViewer.Core.csproj
    • ../src/Blazor.EventGridViewer.Core/Models/CloudEvent.cs
    • ../src/Blazor.EventGridViewer.Core/Models/EventGridEventModel.cs
    • ../src/Blazor.EventGridViewer.Core/Models/EventGridViewerEventModel.cs
    • ../src/Blazor.EventGridViewer.ServerApp/Blazor.EventGridViewer.ServerApp.csproj
    • ../src/Blazor.EventGridViewer.ServerApp/Controllers/EventGridController.cs
    • ../src/Blazor.EventGridViewer.ServerApp/Pages/Index.razor
    • ../src/Blazor.EventGridViewer.ServerApp/Startup.cs
    • ../src/Blazor.EventGridViewer.Services/Adapters/EventGridSchemaAdapter.cs
    • ../src/Blazor.EventGridViewer.Services/Blazor.EventGridViewer.Services.csproj
    • ../src/Blazor.EventGridViewer.Services/Interfaces/IEventGridService.cs
    • ../src/Blazor.EventGridViewer.Unit.Tests/Data.cs
    • ../src/Blazor.EventGridViewer.Unit.Tests/EventGridEventModelAdapterTests.cs
    • ../src/Blazor.EventGridViewer.Unit.Tests/EventGridSchemaAdapterTests.cs

@scottaddie, @ellismg and @ahamad-MS for notification.

@v-yilinhu v-yilinhu marked this pull request as ready for review May 18, 2022 02:23
@v-xuto
Copy link

v-xuto commented Jul 29, 2022

@scottaddie, @ellismg and @ahamad-MS Could you help review this PR? Thanks a lot.

@v-xuto
Copy link

v-xuto commented Aug 3, 2022

@scottaddie, @ellismg and @ahamad-MS Could you help review this PR? Thanks a lot.

1 similar comment
@v-xuto
Copy link

v-xuto commented Aug 30, 2022

@scottaddie, @ellismg and @ahamad-MS Could you help review this PR? Thanks a lot.

/// </summary>
/// <param name="t">json</param>
/// <returns>EventGrid list</returns>
private List<EventGridEventModel> AdaptEventGridEvent(string t)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need EventGridEventModel - can we just use EventGridEvent?


[JsonProperty("time")]
public string Time { get; set; }
public DateTimeOffset Time { get; set; }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EventGridEvent eventGrid = new EventGridEvent(model.Subject, model.EventType, model.DataVersion, model.EventData);
// EventGrid validation message
if (model.EventType == EventTypes.EventGridSubscriptionValidationEvent)
if (eventGrid.TryGetSystemEventData(out object systemEvent))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The systemEvent we get back would still need to be checked to make sure it is the correct type, i.e. SubscriptionValidationEventData. Or we can continue checking the event type, and then do eventGrid.Data.ToObjectFromJson().

<ItemGroup>
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.10.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="System.Memory.Data" Version="6.0.0" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package will get pulled in by Azure.Messaging.EventGrid. Unless we need 6.0.0, I'd just remove this.

EventData = eventGridEvent.Data,
EventTime = eventGridEvent.EventTime.ToString("o") // https://docs.microsoft.com/en-us/dotnet/api/system.datetime.tostring?view=netcore-3.1
EventTime = eventGridEvent.EventTime // https://docs.microsoft.com/en-us/dotnet/api/system.datetime.tostring?view=netcore-3.1
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we remove this?


<ItemGroup>
<PackageReference Include="Microsoft.Azure.EventGrid" Version="3.2.0" />
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.10.0" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.10.0" />
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.11.0" />

@zedy-wj
Copy link

zedy-wj commented Sep 5, 2022

@JoshLove-msft - Updated according to your comments, could you please re-review it? Thanks!

@v-xuto
Copy link

v-xuto commented Nov 4, 2022

@JoshLove-msft - We have updated according to your comments, please help re-review it. Thanks a lot.

1 similar comment
@v-xuto
Copy link

v-xuto commented Mar 10, 2023

@JoshLove-msft - We have updated according to your comments, please help re-review it. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants