Move using statements to globalusing file

This commit is contained in:
Sumit Ghosh 2021-10-13 17:37:01 +05:30
parent 5fd90e8cb6
commit 9d73669d86
6 changed files with 172 additions and 206 deletions

View File

@ -1,5 +1,5 @@
namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF;
{
public enum EventStateEnum public enum EventStateEnum
{ {
NotPublished = 0, NotPublished = 0,
@ -7,4 +7,4 @@
Published = 2, Published = 2,
PublishedFailed = 3 PublishedFailed = 3
} }
}

View File

@ -1,8 +1,5 @@
using Microsoft.EntityFrameworkCore; namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF
{
public class IntegrationEventLogContext : DbContext public class IntegrationEventLogContext : DbContext
{ {
public IntegrationEventLogContext(DbContextOptions<IntegrationEventLogContext> options) : base(options) public IntegrationEventLogContext(DbContextOptions<IntegrationEventLogContext> options) : base(options)
@ -42,4 +39,3 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF
} }
} }
}

View File

@ -1,11 +1,5 @@
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF;
using System;
using System.Text.Json;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF
{
public class IntegrationEventLogEntry public class IntegrationEventLogEntry
{ {
private IntegrationEventLogEntry() { } private IntegrationEventLogEntry() { }
@ -40,4 +34,3 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF
return this; return this;
} }
} }
}

View File

@ -1,11 +1,5 @@
using Microsoft.EntityFrameworkCore.Storage; namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services
{
public interface IIntegrationEventLogService public interface IIntegrationEventLogService
{ {
Task<IEnumerable<IntegrationEventLogEntry>> RetrieveEventLogsPendingToPublishAsync(Guid transactionId); Task<IEnumerable<IntegrationEventLogEntry>> RetrieveEventLogsPendingToPublishAsync(Guid transactionId);
@ -14,4 +8,3 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Servi
Task MarkEventAsInProgressAsync(Guid eventId); Task MarkEventAsInProgressAsync(Guid eventId);
Task MarkEventAsFailedAsync(Guid eventId); Task MarkEventAsFailedAsync(Guid eventId);
} }
}

View File

@ -1,15 +1,5 @@
using Microsoft.EntityFrameworkCore; namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services
{
public class IntegrationEventLogService : IIntegrationEventLogService, IDisposable public class IntegrationEventLogService : IIntegrationEventLogService, IDisposable
{ {
private readonly IntegrationEventLogContext _integrationEventLogContext; private readonly IntegrationEventLogContext _integrationEventLogContext;
@ -107,4 +97,3 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Servi
GC.SuppressFinalize(this); GC.SuppressFinalize(this);
} }
} }
}

View File

@ -1,9 +1,5 @@
using Microsoft.EntityFrameworkCore; namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Utilities;
using System;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Utilities
{
public class ResilientTransaction public class ResilientTransaction
{ {
private DbContext _context; private DbContext _context;
@ -28,4 +24,3 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Utili
}); });
} }
} }
}