Exemple #1
0
        public static ProcService Register(string serviceName, IProc proc)
        {
            var procStub = new ProcService(serviceName, proc);

            AllServices.Add(new ProcWinService(procStub));

            return(procStub);
        }
Exemple #2
0
        private ProcService(string serviceName, IProc proc)
        {
            ServiceName = serviceName;
            Proc        = proc;

            // defaults
            ServiceAccess = ServiceAccess.ServiceAllAccess;
            ServiceType   = ServiceTypes.ServiceWin32OwnProcess;
            ServiceStart  = ServiceStart.ServiceAutoStart;
            ServiceError  = ServiceError.ServiceErrorNormal;

            Path = Assembly.GetEntryAssembly().Location;
        }
Exemple #3
0
        private ProcService(string serviceName, IProc proc)
        {
            ServiceName = serviceName;
            Proc = proc;

            // defaults
            ServiceAccess = ServiceAccess.ServiceAllAccess;
            ServiceType = ServiceTypes.ServiceWin32OwnProcess;
            ServiceStart = ServiceStart.ServiceAutoStart;
            ServiceError = ServiceError.ServiceErrorNormal;

            Path = Assembly.GetEntryAssembly().Location;
        }
Exemple #4
0
        public static ProcService Register(string serviceName, IProc proc)
        {
            var procStub = new ProcService(serviceName, proc);

            AllServices.Add(new ProcWinService(procStub));

            return procStub;
        }