File tree Expand file tree Collapse file tree 5 files changed +40
-6
lines changed
Expand file tree Collapse file tree 5 files changed +40
-6
lines changed Original file line number Diff line number Diff line change 66
77<template >
88 <div class =" sun-engine-footer" >
9- {{$tl("start")}}   ; –  ; <a class =" sun-engine-footer__link" href =" https://sunengine.site" >Sun Engine </a >
9+ {{$tl("start")}}   ; –  ; <a class =" sun-engine-footer__link" href =" https://sunengine.site" >SunEngine </a >
1010 </div >
1111</template >
1212
Original file line number Diff line number Diff line change 11using System ;
22using System . Diagnostics ;
33using System . Reflection ;
4+ using System . Runtime . CompilerServices ;
45
56namespace SunEngine . Cli
67{
@@ -11,10 +12,40 @@ public static class InfoPrinter
1112 /// </summary>
1213 public static void PrintNoArgumentsInfo ( )
1314 {
14- Console . WriteLine (
15- @"Valid startup arguments wasn't provided. To list available commands use ""help"" argument." ) ;
15+ Console . WriteLine ( "Valid startup arguments wasn't provided. To list available commands use \" help\" argument.\n " ) ;
1616 }
1717
18+ public static void PrintStart ( )
19+ {
20+ PrintSunEngineLogo ( ) ;
21+ PrintVersion2 ( ) ;
22+ Console . WriteLine ( ) ;
23+ }
24+
25+ public static void PrintSunEngineLogo ( )
26+ {
27+ Console . ForegroundColor = ConsoleColor . DarkYellow ;
28+ Console . WriteLine ( @"
29+ ______ ______
30+ / ____) | ____) (_)
31+ ( (___ _ _ ____ | |___ ____ ____ _ ____ _____
32+ \___ \| | | | _ \| ___) | _ \ / _ | | _ \| ___ |
33+ ____) ) |_| | | | | |_____| | | ( (_| | | | | | ____|
34+ (______/|____/|_| |_|_______)_| |_|\___ |_|_| |_|_____)
35+ (_____|" ) ;
36+
37+ Console . ResetColor ( ) ;
38+ }
39+
40+ public static void PrintVersion2 ( )
41+ {
42+ Assembly assembly = Assembly . GetExecutingAssembly ( ) ;
43+ FileVersionInfo fileVersionInfo = FileVersionInfo . GetVersionInfo ( assembly . Location ) ;
44+ string version = fileVersionInfo . ProductVersion ;
45+ Console . ForegroundColor = ConsoleColor . DarkYellow ;
46+ Console . WriteLine ( $ " Version: { version } ") ;
47+ Console . ResetColor ( ) ;
48+ }
1849
1950 /// <summary>
2051 /// Print help on dotnet "dotnet SunEngine.dll help"
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ public static class Program
88 {
99 public static void Main ( string [ ] args )
1010 {
11+ InfoPrinter . PrintStart ( ) ;
12+
1113 StartupConfiguration config = new StartupConfiguration ( args ) ;
1214
1315 if ( config . PrintHelp || config . PrintVersion )
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ public void RunServer(StartupConfiguration startupConfiguration)
2020 IWebHostEnvironment env = ( IWebHostEnvironment ) webHost . Services . GetService ( typeof ( IWebHostEnvironment ) ) ;
2121 IConfiguration conf = ( IConfiguration ) webHost . Services . GetService ( typeof ( IConfiguration ) ) ;
2222
23- InfoPrinter . PrintVersion ( ) ;
2423 Startup . SetExceptionsMode ( env , conf ) ;
2524
2625 new InfrastructurePreparer ( ( IConfigurationRoot ) conf ) . DoAll ( ) ;
2726
27+ Console . WriteLine ( ) ;
28+
2829 webHost . Run ( ) ;
2930 }
3031
Original file line number Diff line number Diff line change @@ -76,9 +76,9 @@ protected async Task SendEmailAsync(
7676 {
7777 await client . SendMailAsync ( mailMessage ) ;
7878 }
79- catch ( Exception e )
79+ catch
8080 {
81-
81+ // ignored
8282 }
8383 }
8484 }
You can’t perform that action at this time.
0 commit comments