@@ -15,13 +15,13 @@ public static void Main(string[] args)
1515
1616 WebApplication app = builder . Build ( ) ;
1717
18- app . MapGet ( "/" , ( ) => Task . FromResult < string ? > ( "Welcome to the AssetRipper Native Dialogs Web API!" ) ) ;
19- app . MapGet ( "/open-file" , OpenFileDialog . OpenFile ) ;
20- app . MapGet ( "/open-files" , OpenFileDialog . OpenFiles ) ;
21- app . MapGet ( "/open-folder" , OpenFolderDialog . OpenFolder ) ;
22- app . MapGet ( "/open-folders" , OpenFolderDialog . OpenFolders ) ;
23- app . MapGet ( "/save-file" , SaveFileDialog . SaveFile ) ;
24- app . MapGet ( "/confirm" , static async Task < string ? > ( ) =>
18+ app . MapGetFunction ( "/" , ( ) => Task . FromResult < string ? > ( "Welcome to the AssetRipper Native Dialogs Web API!" ) ) ;
19+ app . MapGetFunction ( "/open-file" , OpenFileDialog . OpenFile ) ;
20+ app . MapGetFunction ( "/open-files" , OpenFileDialog . OpenFiles ) ;
21+ app . MapGetFunction ( "/open-folder" , OpenFolderDialog . OpenFolder ) ;
22+ app . MapGetFunction ( "/open-folders" , OpenFolderDialog . OpenFolders ) ;
23+ app . MapGetFunction ( "/save-file" , SaveFileDialog . SaveFile ) ;
24+ app . MapGetFunction ( "/confirm" , static async Task < string ? > ( ) =>
2525 {
2626 bool ? result = await ConfirmationDialog . Confirm ( new ( ) { Message = "Do you acknowledge?" , Type = ConfirmationDialog . Type . YesNo } ) ;
2727 return result switch
@@ -31,7 +31,7 @@ public static void Main(string[] args)
3131 null => "User canceled the dialog."
3232 } ;
3333 } ) ;
34- app . MapGet ( "/message" , static async Task < string ? > ( ) =>
34+ app . MapGetFunction ( "/message" , static async Task < string ? > ( ) =>
3535 {
3636 await MessageDialog . Message ( "Hello, World!" ) ;
3737 return "Message dialog shown." ;
@@ -45,7 +45,7 @@ private static void DisableCaching(this HttpResponse response)
4545 response . Headers . CacheControl = "no-store, max-age=0" ;
4646 }
4747
48- private static void MapGet ( this WebApplication app , [ StringSyntax ( "Route" ) ] string path , Func < Task < string ? > > func )
48+ private static void MapGetFunction ( this WebApplication app , [ StringSyntax ( "Route" ) ] string path , Func < Task < string ? > > func )
4949 {
5050 app . MapGet ( path , async ( context ) =>
5151 {
@@ -54,7 +54,7 @@ private static void MapGet(this WebApplication app, [StringSyntax("Route")] stri
5454 } ) ;
5555 }
5656
57- private static void MapGet ( this WebApplication app , [ StringSyntax ( "Route" ) ] string path , Func < Task < string [ ] ? > > func )
57+ private static void MapGetFunction ( this WebApplication app , [ StringSyntax ( "Route" ) ] string path , Func < Task < string [ ] ? > > func )
5858 {
5959 app . MapGet ( path , async ( context ) =>
6060 {
0 commit comments