protected WindowsServiceOperationBase(string serviceName, string displayName, string sourceDir, string destDir, string relativeExePath, WindowsServiceOptions.WindowsServiceOptionValues values) { _serviceName = serviceName; _sourceDir = sourceDir; _destDir = destDir; _relativeExePath = relativeExePath; _displayName = displayName; _values = values; }
public IOfferRemoteDeployment WindowsServiceWithInstaller(string serviceName, string displayName, string sourceDir, string destDir, string relativeExePath, string installerParams, Action <IOfferWindowsServiceOptions> options) { var winServiceOptions = new WindowsServiceOptions(); if (options != null) { options(winServiceOptions); } var winServiceOperation = new WindowsServiceWithInstallerOperation(serviceName, displayName, sourceDir, destDir, relativeExePath, installerParams, winServiceOptions.Values); AddOperation(winServiceOperation); return(this); }
/// <summary> /// Will configure provided Windows Service on remote server with provided options. /// </summary> /// <param name="configuration"></param> /// <param name="serviceName">Name of the Windows Service</param> /// <param name="serviceDirPath">Path to the directory where the Windows Service is located</param> /// <param name="relativeExePath">The relative location (from the Windows Service root directory) of the executable (.exe) for which the Windows Service will execute</param> /// <param name="displayName">The display name of the Windows Service as will be displayed in Windows Service Manager</param> /// <param name="options">Additional options for the Windows Service</param> /// <returns></returns> public static IOfferRemoteConfiguration WindowsService(this IOfferRemoteConfiguration configuration, string serviceName, string displayName, string serviceDirPath, string relativeExePath, Action <IOfferWindowsServiceOptions> options) { var winServiceOptions = new WindowsServiceOptions(); if (options != null) { options(winServiceOptions); } var winServiceOperation = new ConfigureWindowsServiceOperation(serviceName, displayName, serviceDirPath, relativeExePath, winServiceOptions.Values); OperationExecutor.Execute((RemoteBuilder)configuration, winServiceOperation); return(configuration); }
/// <summary> /// Will deploy and start provided Windows Service to remote server with provided options. /// </summary> /// <param name="remote"></param> /// <param name="serviceName">Name of the Windows Service</param> /// <param name="sourceDir">Source directory for where the Windows Service files are located</param> /// <param name="destDir">Destination directory for where you want the Windows Service files to be deployed</param> /// <param name="relativeExePath">The relative location (to destDir) of the executable (.exe) for which the Windows Service will execute</param> /// <param name="displayName">The display name of the Windows Service as will be displayed in Windows Service Manager</param> /// <param name="options">Additional options for the Windows Service</param> /// <returns></returns> public static IOfferRemoteDeployment WindowsService(this IOfferRemoteDeployment remote, string serviceName, string displayName, string sourceDir, string destDir, string relativeExePath, Action <IOfferWindowsServiceOptions> options) { var winServiceOptions = new WindowsServiceOptions(); if (options != null) { options(winServiceOptions); } var winServiceOperation = new WindowsServiceDeployOperation(serviceName, displayName, sourceDir, destDir, relativeExePath, winServiceOptions.Values); OperationExecutor.Execute((RemoteBuilder)remote, winServiceOperation); return(remote); }
/// <summary> /// Will deploy and start provided Windows Service to remote server with provided options. /// </summary> /// <param name="serviceName"></param> /// <param name="sourceDir"></param> /// <param name="destDir"></param> /// <param name="relativeExePath"></param> /// <param name="displayName"></param> /// <param name="options"></param> /// <returns></returns> public static IOfferRemoteDeployment WindowsService(this IOfferRemoteDeployment remote, string serviceName, string displayName, string sourceDir, string destDir, string relativeExePath, Action <IOfferWindowsServiceOptions> options) { var winServiceOptions = new WindowsServiceOptions(); if (options != null) { options(winServiceOptions); } var winServiceOperation = new WindowsServiceOperation(serviceName, displayName, sourceDir, destDir, relativeExePath, winServiceOptions.Values); Configure.Operation(remote, winServiceOperation); //Configure.DeploymentOperations.AddOperation(winServiceOperation); return(remote); }