Skip to content

Commit e8bd374

Browse files
authored
Merge pull request #18 from masfj/hotfix/fix-typo-null-batch-interceptor-class
fix typo NullBatchInerceptor to NullBatchInterceptor
2 parents 4b29a5a + 5fc6b17 commit e8bd374

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/MicroBatchFramework.WebHosting/BatchEngineHostingExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static IWebHostBuilder PrepareBatchEngineMiddleware(this IWebHostBuilder
2222
return builder
2323
.ConfigureServices(services =>
2424
{
25-
services.AddSingleton<IBatchInterceptor>(interceptor ?? NullBatchInerceptor.Default);
25+
services.AddSingleton<IBatchInterceptor>(interceptor ?? NullBatchInterceptor.Default);
2626
services.AddSingleton<TargetBatchTypeCollection>(target);
2727
foreach (var item in target)
2828
{

src/MicroBatchFramework/BatchEngineHostBuilderExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static IHostBuilder UseBatchEngine(this IHostBuilder hostBuilder, string[
5959
services.AddOptions<ConsoleLifetimeOptions>().Configure(x => x.SuppressStatusMessages = true);
6060
services.AddSingleton<string[]>(args);
6161
services.AddSingleton<IHostedService, BatchEngineService>();
62-
services.AddSingleton<IBatchInterceptor>(interceptor ?? NullBatchInerceptor.Default);
62+
services.AddSingleton<IBatchInterceptor>(interceptor ?? NullBatchInterceptor.Default);
6363
if (type != null)
6464
{
6565
services.AddSingleton<Type>(type);
@@ -142,7 +142,7 @@ public static IHostBuilder UseBatchEngine<T>(this IHostBuilder hostBuilder, stri
142142
services.AddSingleton<string[]>(args);
143143
services.AddSingleton<Type>(typeof(T));
144144
services.AddSingleton<IHostedService, BatchEngineService>();
145-
services.AddSingleton<IBatchInterceptor>(interceptor ?? NullBatchInerceptor.Default);
145+
services.AddSingleton<IBatchInterceptor>(interceptor ?? NullBatchInterceptor.Default);
146146
services.AddTransient<T>();
147147
});
148148

src/MicroBatchFramework/BatchEngineService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public BatchEngineService(IApplicationLifetime appLifetime, Type type, MethodInf
3333
this.appLifetime = appLifetime;
3434
this.provider = provider;
3535
this.logger = logger;
36-
this.interceptor = (provider.GetService(typeof(IBatchInterceptor)) as IBatchInterceptor) ?? NullBatchInerceptor.Default;
36+
this.interceptor = (provider.GetService(typeof(IBatchInterceptor)) as IBatchInterceptor) ?? NullBatchInterceptor.Default;
3737
this.cancellationTokenSource = new CancellationTokenSource();
3838
}
3939

src/MicroBatchFramework/IBatchInterceptor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public interface IBatchInterceptor
2727
ValueTask OnBatchRunCompleteAsync(BatchContext context, string errorMessageIfFailed, Exception exceptionIfExists);
2828
}
2929

30-
public class NullBatchInerceptor : IBatchInterceptor
30+
public class NullBatchInterceptor : IBatchInterceptor
3131
{
32-
public static readonly IBatchInterceptor Default = new NullBatchInerceptor();
32+
public static readonly IBatchInterceptor Default = new NullBatchInterceptor();
3333
readonly ValueTask Empty = default(ValueTask);
3434

3535
public ValueTask OnBatchEngineBeginAsync(IServiceProvider serviceProvider, ILogger<BatchEngine> logger)

0 commit comments

Comments
 (0)