Skip to content

Commit

Permalink
Resolving comments
Browse files Browse the repository at this point in the history
  • Loading branch information
harrieoriowo committed May 29, 2024
1 parent f1ed2e4 commit 46113e7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/EventGridExplorerLibrary/EventGridExplorerLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.24.0" />
<PackageReference Include="Azure.Identity" Version="1.10.3" />
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.22.0-beta.1" />
<PackageReference Include="Azure.Identity" Version="1.11.3" />
<PackageReference Include="Azure.ResourceManager.EventGrid" Version="1.1.0-beta.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.24" />
Expand Down
11 changes: 5 additions & 6 deletions src/EventGridExplorerLibrary/EventGridLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Azure.Messaging.EventGrid.Namespaces;
using Azure.ResourceManager.EventGrid;
using ServiceBusExplorer.Utilities.Helpers;
using Microsoft.Azure.Management.EventGridV2;

namespace EventGridExplorerLibrary
{
Expand Down Expand Up @@ -151,17 +150,17 @@ public async Task<bool> EventActionsAsync(string action, List<string> lockTokens
switch (action)
{
case "Acknowledge":
AcknowledgeResult acknowledgeResult = await dataPlaneClients[topicName].AcknowledgeCloudEventsAsync(topicName, subscriptionName, lockTokens);
AcknowledgeResult acknowledgeResult = await dataPlaneClients[topicName].AcknowledgeCloudEventsAsync(topicName, subscriptionName, new AcknowledgeOptions(lockTokens));
succeededLockTokens = acknowledgeResult.SucceededLockTokens;
failedLockTokens = acknowledgeResult.FailedLockTokens;
break;
case "Release":
ReleaseResult releaseResult = await dataPlaneClients[topicName].ReleaseCloudEventsAsync(topicName, subscriptionName, lockTokens);
ReleaseResult releaseResult = await dataPlaneClients[topicName].ReleaseCloudEventsAsync(topicName, subscriptionName, new ReleaseOptions(lockTokens));
succeededLockTokens = releaseResult.SucceededLockTokens;
failedLockTokens = releaseResult.FailedLockTokens;
break;
case "Reject":
RejectResult rejectResult = await dataPlaneClients[topicName].RejectCloudEventsAsync(topicName, subscriptionName, lockTokens);
RejectResult rejectResult = await dataPlaneClients[topicName].RejectCloudEventsAsync(topicName, subscriptionName, new RejectOptions(lockTokens));
succeededLockTokens = rejectResult.SucceededLockTokens;
failedLockTokens = rejectResult.FailedLockTokens;
break;
Expand All @@ -184,8 +183,8 @@ public async Task<bool> EventActionsAsync(string action, List<string> lockTokens
foreach (FailedLockToken lockToken in failedLockTokens)
{
writeToLog($"Lock Token: {lockToken.LockToken}");
writeToLog($"Error Code: {lockToken.ErrorCode}");
writeToLog($"Error Description: {lockToken.ErrorDescription}");
writeToLog($"Error Code: {lockToken.Error.Code}");
writeToLog($"Error Description: {lockToken.Error.Message}");
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/EventGridExplorerLibrary/Management/NamespaceTopic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.EventGridV2
namespace EventGridExplorerLibrary
{
using global::Azure.ResourceManager.Models;

/// <summary>
/// Namespace topic details.
/// </summary>
[Rest.Serialization.JsonTransformation]
public partial class NamespaceTopic
{
/// <summary>
Expand Down
3 changes: 0 additions & 3 deletions src/ServiceBusExplorer/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@

#region Using Directives
using Azure;
using Azure.Messaging.EventGrid.Namespaces;
using Azure.ResourceManager.EventGrid;
using EventGridExplorerLibrary;
using Microsoft.Azure.Management.EventGridV2;
using Microsoft.Azure.NotificationHubs;
using Microsoft.Rest.Azure;
using Microsoft.ServiceBus.Messaging;
using ServiceBusExplorer.Controls;
using ServiceBusExplorer.Enums;
Expand Down
1 change: 0 additions & 1 deletion src/ServiceBusExplorer/ServiceBusExplorer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,6 @@
<PackageReference Include="Microsoft.Azure.Services.AppAuthentication" Version="1.6.2" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="WindowsAzure.ServiceBus" Version="6.2.2" />
<PackageReference Include="WindowsAzure.ServiceBus" Version="7.0.1" />
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit 46113e7

Please sign in to comment.