Пример #1
0
        /// <summary>
        /// Deploy and run the package.
        /// </summary>
        public void Run(DeviceItem device, Action <LauncherStates, string> stateUpdate)
        {
            // Save argument
            this.stateUpdate = stateUpdate;

            // Prepare output
            outputPane.EnsureLoaded();

            // Start the device.
            Task.Factory.StartNew(() => RunOnStartedDevice(device.Device), cancellationTokenSource.Token);
        }
Пример #2
0
 /// <summary>
 /// Record the given log entry if the level is sufficient.
 /// </summary>
 protected override void Write(Levels level, DContext context, string url, int column, int lineNr, string msg, Exception exception,
                               object[] args)
 {
     if (level < Levels.Error)
     {
         return;
     }
     if ((msg == null) && (exception != null))
     {
         msg = exception.Message;
     }
     if (msg == null)
     {
         return;
     }
     if (!Show(level, context))
     {
         return;
     }
     outputPane.EnsureLoaded();
     outputPane.LogLine(FormatLevel(level) + FormatContext(context) + string.Format(msg, args));
 }