Skip to content

Commit f8da07c

Browse files
committed
Add GeneratedDtos StartupTask
1 parent fc29063 commit f8da07c

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

‎MyApp.Client/src/dtos.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* Options:
2-
Date: 2025-12-04 22:23:03
3-
Version: 10.01
2+
Date: 2026-09-09 13:53:13
3+
Version: 10.15
44
Tip: To override a DTO option, remove "//" prefix before updating
55
BaseUrl: https://localhost:5001
66
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using ServiceStack;
2+
3+
[assembly: HostingStartup(typeof(MyApp.ConfigureGeneratedDtos))]
4+
5+
namespace MyApp;
6+
7+
public class ConfigureGeneratedDtos : IHostingStartup
8+
{
9+
public void Configure(IWebHostBuilder builder) => builder
10+
.ConfigureAppHost(afterAppHostInit: appHost =>
11+
{
12+
StartupTasks.Register("dtos", () =>
13+
appHost.GetPlugin<NativeTypesFeature>().GenerateDtos(new GenerateDtosOptions
14+
{
15+
Directory = appHost.MapProjectPath("~/../MyApp.Client"),
16+
}));
17+
});
18+
}

0 commit comments

Comments
 (0)