File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
OneScript.StandardLibrary Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,18 @@ public class SystemEnvironmentContext : AutoContext<SystemEnvironmentContext>
4949 /// <summary>
5050 /// Версия OneScript, выполняющая данный сценарий
5151 /// </summary>
52- [ ContextProperty ( "Версия" , "Version" ) ]
53- public string Version => Assembly . GetExecutingAssembly ( ) . GetName ( ) . Version . ToString ( ) ;
52+ [ ContextProperty ( "Версия" , "Version" ) ]
53+ public string Version
54+ {
55+ get
56+ {
57+ var assembly = Assembly . GetExecutingAssembly ( ) ;
58+ var informationVersion = assembly . GetCustomAttribute < AssemblyInformationalVersionAttribute > ( ) ?
59+ . InformationalVersion ?? assembly . GetName ( ) . Version ? . ToString ( ) ?? "<unset>" ;
60+
61+ return informationVersion ;
62+ }
63+ }
5464
5565 /// <summary>
5666 /// Тип операционной системы, на которой выполняется сценарий
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ public override int Execute()
3030 Output . WriteLine ( " -encoding=<encoding-name> set output encoding" ) ;
3131 Output . WriteLine ( " -codestat=<filename> write code statistics" ) ;
3232 Output . WriteLine ( ) ;
33- Output . WriteLine ( ) ;
3433 Output . WriteLine ( "III. Run as CGI application: oscript.exe -cgi <script_path> [script arguments..]" ) ;
3534 Output . WriteLine ( " Runs as CGI application under HTTP-server (Apache/Nginx/IIS/etc...)" ) ;
3635
Original file line number Diff line number Diff line change 158158 | -encoding=<encoding-name> set output encoding
159159 | -codestat=<filename> write code statistics
160160 |
161- |III. Build standalone executable: oscript.exe -make <script_path> <output_exe>
162- | Builds a standalone executable module based on script specified
163- |
164- |IV. Run as CGI application: oscript.exe -cgi <script_path> [script arguments..]
161+ |III. Run as CGI application: oscript.exe -cgi <script_path> [script arguments..]
165162 | Runs as CGI application under HTTP-server (Apache/Nginx/IIS/etc...)" ;
166163
167164 Возврат НормализоватьПереводыСтрок(Текст);
You can’t perform that action at this time.
0 commit comments