예제 #1
0
 public MainPage(IOSCommands inCommands)
 {
     _commandExecuter = inCommands;
     InitializeComponent();
     homeDirectory.Dispatcher.BeginInvokeOnMainThread(() => { homeDirectory.Text = CommandShellImmortal.myCommandShellImmortal.HostGetRootDirectory(); });
     homeDirectory.Dispatcher.BeginInvokeOnMainThread(() => { relativeDirectory.Text = CommandShellImmortal.myCommandShellImmortal.HostGetRelativeDirectory(); });
     _myAccumulatedOutput = "";
     consoleOutput.Text   = CommandShellImmortal.myCommandShellImmortal.HostGetConsoleOutput();
     _commandOutputWriter = new TextOutputAccumulator(this);
     _refreshQueue        = new AsyncQueue <bool>();
     CheckRefreshQueueAsync();
 }
예제 #2
0
        public App(IOSCommands inCommands)
        {
            GenericLogsInterface.SetToGenericLogs();
//            AzureBlobsLogsInterface.SetToAzureBlobsLogs();
            new Thread(new ThreadStart(() => _immortalHandle = AmbrosiaFactory.Deploy <ICommandShellImmortal>("CommandShell", new CommandShellImmortal(), 2500))).Start();
            while (CommandShellImmortal.myCommandShellImmortal == null)
            {
                ;
            }
            InitializeComponent();
            MainPage = new MainPage(inCommands);
        }
예제 #3
0
 public MainPage(IOSCommands inCommands)
 {
     _commandExecuter = inCommands;
     InitializeComponent();
     // Initialize the on-screen homeDirectory to the potentially recovered contents
     homeDirectory.Dispatcher.BeginInvokeOnMainThread(() => { homeDirectory.Text = CommandShellImmortal.myCommandShellImmortal.HostRootDirectory(); });
     // Initialize the on-screen relativeDirectory to the potentially recovered contents
     homeDirectory.Dispatcher.BeginInvokeOnMainThread(() => { relativeDirectory.Text = CommandShellImmortal.myCommandShellImmortal.HostRelativeDirectory(); });
     // Initialize the current command
     command.Dispatcher.BeginInvokeOnMainThread(() => { command.Text = CommandShellImmortal.myCommandShellImmortal.HostCurrentCommand(); });
     _myAccumulatedOutput = "";
     // Initialize the on-screen contents to the potentially recovered contents
     consoleOutput.Text   = CommandShellImmortal.myCommandShellImmortal.HostConsoleOutput();
     _commandOutputWriter = new TextOutputAccumulator(this);
     _refreshQueue        = new AsyncQueue <bool>();
     CheckRefreshQueueAsync();
 }
예제 #4
0
        public App(IOSCommands inCommands)
        {
            GenericLogsInterface.SetToGenericLogs();
            // Store the logs in Azure by default. Comment the line below and uncomment the line above to store them in the file system.

            //AzureBlobsLogsInterface.SetToAzureBlobsLogs();

            // Deploy the immortal on another thread as part of startup.
            new Thread(new ThreadStart(() => _immortalHandle = AmbrosiaFactory.Deploy <ICommandShellImmortal>("CommandShell", new CommandShellImmortal(), 2500))).Start();

            // Wait for the immortal to finish recovery
            while (CommandShellImmortal.myCommandShellImmortal == null)
            {
                ;
            }
            InitializeComponent();

            // Pass along the instantiated operating system specific part of the code to the main page initializer.
            MainPage = new MainPage(inCommands);
        }