From 631a64940eedfcfff32e3bc446aad071c3846643 Mon Sep 17 00:00:00 2001 From: Reuben Bond Date: Fri, 24 Feb 2023 08:51:19 -0800 Subject: [PATCH] Fix compiler warnings for unused variables --- .../Commands/CreateOrderDraftCommandHandler.cs | 12 ------------ .../ProductPriceChangedIntegrationEventHandler.cs | 4 ++-- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderDraftCommandHandler.cs b/src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderDraftCommandHandler.cs index 32d965fd0..be3860d5c 100644 --- a/src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderDraftCommandHandler.cs +++ b/src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderDraftCommandHandler.cs @@ -7,17 +7,6 @@ using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order public class CreateOrderDraftCommandHandler : IRequestHandler { - private readonly IOrderRepository _orderRepository; - private readonly IIdentityService _identityService; - private readonly IMediator _mediator; - - // Using DI to inject infrastructure persistence Repositories - public CreateOrderDraftCommandHandler(IMediator mediator, IIdentityService identityService) - { - _identityService = identityService ?? throw new ArgumentNullException(nameof(identityService)); - _mediator = mediator ?? throw new ArgumentNullException(nameof(mediator)); - } - public Task Handle(CreateOrderDraftCommand message, CancellationToken cancellationToken) { @@ -32,7 +21,6 @@ public class CreateOrderDraftCommandHandler } } - public record OrderDraftDTO { public IEnumerable OrderItems { get; init; } diff --git a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs index 1172d0820..bb164c0d1 100644 --- a/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs +++ b/src/Services/Webhooks/Webhooks.API/IntegrationEvents/ProductPriceChangedIntegrationEventHandler.cs @@ -2,8 +2,8 @@ public class ProductPriceChangedIntegrationEventHandler : IIntegrationEventHandler { - public async Task Handle(ProductPriceChangedIntegrationEvent @event) + public Task Handle(ProductPriceChangedIntegrationEvent @event) { - int i = 0; + return Task.CompletedTask; } }