Skip to content

Commit f119857

Browse files
committed
fixing di
1 parent e55789c commit f119857

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

Readme.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,23 +132,26 @@ AssemblyRegistry.Add(typeof(Program).Assembly);
132132

133133
builder
134134
.ConfigureWithPandaVault()
135-
.AddSerilog(LogBackend.Loki)
136-
.AddResponseCrafter(NamingConvention.ToUpperSnakeCase)
135+
.AddSerilog(LogBackend.ElasticSearch)
136+
.AddResponseCrafter(NamingConvention.ToSnakeCase)
137137
.AddOpenApi()
138+
.AddMaintenanceMode()
138139
.AddOpenTelemetry()
139-
.AddMapMinimalApis(AssemblyRegistry.ToArray())
140+
.AddMinimalApis(AssemblyRegistry.ToArray())
140141
.AddControllers(AssemblyRegistry.ToArray())
141142
.AddMediatrWithBehaviors(AssemblyRegistry.ToArray())
142143
.AddResilienceDefaultPipeline()
143-
.MapDefaultTimeZone()
144+
.AddDistributedSignalR("localhost:6379", "app_name") // or .AddSignalR()
144145
.AddDistributedCache(o =>
145146
{
146-
o.RedisConnectionString = "redis://localhost:6379";
147-
o.ChannelPrefix = "app_name:";
147+
o.RedisConnectionString = "localhost:6379";
148+
o.ChannelPrefix = "app_name";
148149
})
149-
.AddMaintenanceMode() // Works only with DistributedCache
150-
.AddDistributedSignalR("redis://localhost:6379","app_name:") // or .AddSignalR()
150+
.AddMassTransit(AssemblyRegistry.ToArray())
151+
.AddFileExporter(AssemblyRegistry.ToArray())
152+
.MapDefaultTimeZone()
151153
.AddCors()
154+
.AddOutboundLoggingHandler()
152155
.AddHealthChecks();
153156

154157

SharedKernel.Demo/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using DistributedCache.Extensions;
2+
using FileExporter.Extensions;
23
using FluentMinimalApiMapper;
34
using Microsoft.AspNetCore.Mvc;
45
using Microsoft.EntityFrameworkCore;
@@ -38,6 +39,7 @@
3839
o.ChannelPrefix = "app_name";
3940
})
4041
.AddMassTransit(AssemblyRegistry.ToArray())
42+
.AddFileExporter(AssemblyRegistry.ToArray())
4143
.MapDefaultTimeZone()
4244
.AddCors()
4345
.AddOutboundLoggingHandler()

0 commit comments

Comments
 (0)