public static ProcService Register(string serviceName, IProc proc) { var procStub = new ProcService(serviceName, proc); AllServices.Add(new ProcWinService(procStub)); return(procStub); }
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; }
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; }
public static ProcService Register(string serviceName, IProc proc) { var procStub = new ProcService(serviceName, proc); AllServices.Add(new ProcWinService(procStub)); return procStub; }