Beispiel #1
0
        public static void Run(string name, IEnumerable <IStage> stages, PipelineCustomisation customiser = null)
        {
            var service = new ServiceWrapper(name, stages, customiser);

            if (Environment.UserInteractive)
            {
                Console.WriteLine("Running Console...");
                Console.WriteLine("Press any key to exit");

                service.Start(new string[0]);

                Console.ReadKey();

                service.Stop();
            }
            else
            {
                ServiceBase.Run(service);
            }
        }
Beispiel #2
0
 public StageArgs(PipelineCustomisation customiser, string[] startArgs)
 {
     _customiser     = customiser;
     StartArgs       = startArgs;
     InstanceFactory = DefaultInstanceFactory;
 }
Beispiel #3
0
        public ServiceWrapper(string name, IEnumerable <IStage> stages, PipelineCustomisation customiser)
        {
            ServiceName = name;

            _pipeline = new Pipeline(stages, customiser);
        }
Beispiel #4
0
 public Pipeline(IEnumerable <IStage> stages, PipelineCustomisation customiser = null)
 {
     _customiser = customiser ?? new PipelineCustomisation();
     _stages     = stages.ToArray();
 }