File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using System . Text . Json . Serialization ;
21using Sharkable . Sample ;
32using Microsoft . AspNetCore . Mvc ;
43using Sharkable ;
4+ using Microsoft . Extensions . Options ;
55
66var builder = WebApplication . CreateSlimBuilder ( args ) ; //.Sharkable([typeof(App).Assembly]);
77
2121 } ;
2222app . AddMongoGroup ( ) ;
2323app . UseShark ( ) ;
24+
25+ var sopt = Shark . Services . GetService < IOptions < SharkOption > > ( ) ;
26+ Console . WriteLine ( sopt ? . Value . AotMode ) ;
2427var todosApi = app . MapGroup ( "/todos" ) ;
2528todosApi . MapGet ( "/init" , async ( [ FromServices ] IMonitor monitor ) =>
2629{
Original file line number Diff line number Diff line change 1313 <description >a dotnet minimal api framework collection aimed to support aot</description >
1414 <releaseNotes >fix endpoint wiring issue</releaseNotes >
1515 <copyright >CopyRight 2024 Penglei</copyright >
16- <tags >minialapi aot framework toolkit</tags >
16+ <tags >minimalapi aot framework toolkit</tags >
1717 <dependencies >
1818 <dependency id =" Microsoft.AspNetCore.OpenApi" version =" 8.0.8" />
1919 <dependency id =" Swashbuckle.AspNetCore" version =" 6.7.3" />
You can’t perform that action at this time.
0 commit comments