Example #1
0
        public static DaemonCommand CreateDaemonCommand()
        {
            var shell               = new Shell();
            var coloredConsole      = ColoredTextWriter.Out;
            var coloredErrorConsole = ColoredTextWriter.Error;
            var fuse                 = FuseApi.Initialize("daemon", new List <string>());
            var daemonReport         = fuse.Report;
            var localSocketServer    = new LocalSocketServer(daemonReport);
            var serviceRunnerFactory = new ServiceRunnerFactory(
                new Service("CodeAssistance", fuse.CodeAssistance)
                , new Service("Tray", fuse.Tray)
                );

            var daemonSingleInstance = new EnsureSingleUser(
                coloredErrorConsole,
                shell,
                userFile: DaemonPossessionFile);

            return(new DaemonCommand(
                       coloredConsole,
                       daemonReport,
                       daemonSingleInstance,
                       fuse,
                       (a) => new DaemonRunner(
                           daemonSingleInstance,
                           localSocketServer,
                           a.Debug,
                           !a.IsMinimal,
                           fuse,
                           serviceRunnerFactory,
                           daemonReport)));
        }
Example #2
0
 public void Test()
 {
     ServiceRunnerFactory.Verify(f => f.Create(ProjectRunner, Server, null, TimeService.Object), Times.Once());
 }