File tree Expand file tree Collapse file tree
Common.BasicHelper.Samples Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using Common . BasicHelper . Core . Shell ;
2+ using Common . BasicHelper . Utils . Extensions ;
23using System . Web ;
34
45var builder = WebApplication . CreateBuilder ( args ) ;
1920
2021app . UseHttpsRedirection ( ) ;
2122
22- app . MapGet ( "/Core/Shell/CommandsExecutor /{cmd}.{args?}" ,
23+ app . MapGet ( "/Utils/Extensions/StringHelper/ExecuteAsCommand /{cmd}.{args?}" ,
2324 ( string cmd , string ? args ) => cmd . ExecuteAsCommand (
24- args == "," || args == "{args}" || string . IsNullOrEmpty ( args )
25+ args == "," || args == "{args}" || args . IsNullOrWhiteSpace ( )
2526 ? null : HttpUtility . UrlDecode ( args )
2627 )
2728)
28- . WithName ( "CommandsExecutor" )
29+ . WithName ( "ExecuteAsCommand" )
30+ . WithOpenApi ( ) ;
31+
32+ app . MapGet ( "/Utils/Extensions/StringHelper/ExecuteAsCommandAsync/{cmd}.{args?}" ,
33+ async ( string cmd , string ? args ) => await cmd . ExecuteAsCommandAsync (
34+ args == "," || args == "{args}" || args . IsNullOrWhiteSpace ( )
35+ ? null : HttpUtility . UrlDecode ( args )
36+ )
37+ )
38+ . WithName ( "ExecuteAsCommandAsync" )
2939. WithOpenApi ( ) ;
3040
3141app . Run ( ) ;
Original file line number Diff line number Diff line change 1+ namespace Common . BasicHelper . Samples . Utils . Extensions ;
2+
3+ public static class StringHelper
4+ {
5+
6+
7+ }
You can’t perform that action at this time.
0 commit comments