Пример #1
0
        /// <summary>
        /// Sets the <see cref="IExternalApplication"/> interface.
        /// </summary>
        /// <param name="externalApplication"></param>
        /// <returns></returns>
        public static void SetExternalApplication(IExternalApplication externalApplication)
        {
            _externalApplication = externalApplication;

            // test
            var entity = _externalApplication.GetEntity(1234);
            MessageBox.Show(string.Format("Id={0}; Name={1}", entity.id, entity.name));
        }
Пример #2
0
        /// <summary>
        /// Sets the <see cref="IExternalApplication"/> interface.
        /// </summary>
        /// <param name="externalApplication"></param>
        /// <returns></returns>
        public static void SetExternalApplication(IExternalApplication externalApplication)
        {
            _externalApplication = externalApplication;

            // test
            var entity = _externalApplication.GetEntity(1234);

            MessageBox.Show(string.Format("Id={0}; Name={1}", entity.id, entity.name));
        }
Пример #3
0
 public static Process StartWithoutShellExecute(this IExternalApplication app, IEnumerable <string> args)
 {
     return(app.Start(new ProcessStartInfo
     {
         Arguments = args.Select(a => "\"" + a + "\"").Join(" "),
         UseShellExecute = false,
         RedirectStandardInput = true,
         RedirectStandardOutput = true,
         RedirectStandardError = true,
         CreateNoWindow = true
     }));
 }
Пример #4
0
 public BuildCommand(
     IFuseLauncher daemonSpawner,
     ColoredTextWriter outWriter,
     ColoredTextWriter errorWriter,
     IReport report,
     ProjectDetector projectDetector,
     IFileSystem fileSystem,
     IExternalApplication uno)
     : base("build", "Build a project for a given target")
 {
     _daemonSpawner   = daemonSpawner;
     _outWriter       = outWriter;
     _errorWriter     = errorWriter;
     _report          = report;
     _projectDetector = projectDetector;
     _fileSystem      = fileSystem;
     _uno             = uno;
 }
Пример #5
0
 public App()
 {
     _App = new InnerApp();
 }
Пример #6
0
 public Service(string name, IExternalApplication application)
 {
     Name        = name;
     Application = application;
 }
Пример #7
0
 public static Process Start(this IExternalApplication app, IEnumerable <string> args)
 {
     return(app.Start(new ProcessStartInfo {
         Arguments = args.Select(a => "\"" + a + "\"").Join(" ")
     }));
 }