File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ public void PluginMain() {
3434 _Commands . Add ( new Echo ( ) ) ;
3535 _Commands . Add ( new Hostname ( ) ) ;
3636 _Commands . Add ( new Ls ( ) ) ;
37+ _Commands . Add ( new Printenv ( ) ) ;
3738 _Commands . Add ( new Yes ( ) ) ;
3839 }
3940 }
Original file line number Diff line number Diff line change 1+ using System . IO ;
2+ using System . Collections ;
3+ using ILeoConsole ;
4+ using ILeoConsole . Plugin ;
5+ using ILeoConsole . Core ;
6+
7+ namespace LeoConsole_ExamplePlugin {
8+ public class Printenv : ICommand {
9+ public string Name { get { return "printenv" ; } }
10+ public string Description { get { return "print the environment" ; } }
11+ public Action CommandFunktion { get { return ( ) => Command ( ) ; } }
12+ private string [ ] _InputProperties ;
13+ public string [ ] InputProperties { get { return _InputProperties ; } set { _InputProperties = value ; } }
14+ public void Command ( ) {
15+ foreach ( DictionaryEntry de in Environment . GetEnvironmentVariables ( ) ) {
16+ Console . WriteLine ( "{0}={1}" , de . Key , de . Value ) ;
17+ }
18+ }
19+ }
20+ }
21+
22+ // vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab
You can’t perform that action at this time.
0 commit comments