Skip to content

Commit 97e6551

Browse files
committed
feat: update check
1 parent d2d17d2 commit 97e6551

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎MASA.Contrib.sln‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MASA.Contrib.Dispatcher.Rem
4242
EndProject
4343
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MASA.Contrib.Dispatcher.Remoting.EventLogs.EF", "src\Dispatcher\MASA.Contrib.Dispatcher.Remoting.EventLogs.EF\MASA.Contrib.Dispatcher.Remoting.EventLogs.EF.csproj", "{C592FD4A-4F45-438A-A092-4CBE85D4A77D}"
4444
EndProject
45+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{38E6C400-90C0-493E-9266-C1602E229F1B}"
46+
EndProject
4547
Global
4648
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4749
Debug|Any CPU = Debug|Any CPU

‎src/Dispatcher/MASA.Contrib.Dispatcher.Remoting.Dapr/ServiceCollectionExtensions.cs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ public static ServiceCollection AddDaprEventBus<TIntegrationEventLogService>(thi
88
services.AddScoped<IIntegrationEventBus, IntegrationEventBus>();
99
services.AddScoped<IIntegrationEventLogService, TIntegrationEventLogService>();
1010

11+
var serviceBuilder = services.BuildServiceProvider();
12+
if (serviceBuilder.GetService<DaprClient>() is null)
13+
throw new Exception("Please add DaprClient first.");
14+
1115
// check AppConfig is configured
12-
if (services.BuildServiceProvider().GetService<IOptionsMonitor<AppConfig>>() is null)
16+
if (serviceBuilder.GetService<IOptionsMonitor<AppConfig>>() is null)
1317
throw new Exception("Please configure the AppConfig options first.");
1418

1519
return services;

src/Dispatcher/MASA.Contrib.Dispatcher.Remoting.EventLogs.EF/Services/IntegrationEventLogService.cs renamed to src/Dispatcher/MASA.Contrib.Dispatcher.Remoting.EventLogs.EF/IntegrationEventLogService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace MASA.Contrib.Dispatcher.Remoting.EventLogs.EF.Services;
1+
namespace MASA.Contrib.Dispatcher.Remoting.EventLogs.EF;
22
public class IntegrationEventLogService : IIntegrationEventLogService
33
{
44
private readonly IntegrationEventLogContext _eventLogContext;

0 commit comments

Comments
 (0)