More random clean up
This commit is contained in:
parent
e166b28a0a
commit
7027967568
@ -8,12 +8,6 @@ public interface IEventBus
|
|||||||
where T : IntegrationEvent
|
where T : IntegrationEvent
|
||||||
where TH : IIntegrationEventHandler<T>;
|
where TH : IIntegrationEventHandler<T>;
|
||||||
|
|
||||||
void SubscribeDynamic<TH>(string eventName)
|
|
||||||
where TH : IDynamicIntegrationEventHandler;
|
|
||||||
|
|
||||||
void UnsubscribeDynamic<TH>(string eventName)
|
|
||||||
where TH : IDynamicIntegrationEventHandler;
|
|
||||||
|
|
||||||
void Unsubscribe<T, TH>()
|
void Unsubscribe<T, TH>()
|
||||||
where TH : IIntegrationEventHandler<T>
|
where TH : IIntegrationEventHandler<T>
|
||||||
where T : IntegrationEvent;
|
where T : IntegrationEvent;
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
using Dapper;
|
using System.Collections.Generic;
|
||||||
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Microsoft.Extensions.Options;
|
|
||||||
using Ordering.BackgroundTasks.Events;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Dapper;
|
||||||
|
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Ordering.BackgroundTasks.Events;
|
||||||
|
|
||||||
namespace Ordering.BackgroundTasks.Services
|
namespace Ordering.BackgroundTasks.Services
|
||||||
{
|
{
|
||||||
|
@ -38,10 +38,8 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" />
|
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" />
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" />
|
||||||
<PackageReference Include="Microsoft.Web.LibraryManager.Build" />
|
|
||||||
<PackageReference Include="Polly" />
|
<PackageReference Include="Polly" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" />
|
<PackageReference Include="Swashbuckle.AspNetCore" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" />
|
|
||||||
<PackageReference Include="System.Data.SqlClient" />
|
<PackageReference Include="System.Data.SqlClient" />
|
||||||
<PackageReference Include="Azure.Extensions.AspNetCore.Configuration.Secrets" />
|
<PackageReference Include="Azure.Extensions.AspNetCore.Configuration.Secrets" />
|
||||||
<PackageReference Include="Azure.Identity" />
|
<PackageReference Include="Azure.Identity" />
|
||||||
|
@ -29,7 +29,6 @@ app.UseServiceDefaults();
|
|||||||
app.MapGet("/", () => Results.Redirect("/swagger"));
|
app.MapGet("/", () => Results.Redirect("/swagger"));
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
|
|
||||||
|
|
||||||
var eventBus = app.Services.GetRequiredService<IEventBus>();
|
var eventBus = app.Services.GetRequiredService<IEventBus>();
|
||||||
|
|
||||||
eventBus.Subscribe<ProductPriceChangedIntegrationEvent, ProductPriceChangedIntegrationEventHandler>();
|
eventBus.Subscribe<ProductPriceChangedIntegrationEvent, ProductPriceChangedIntegrationEventHandler>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user