private static string GetSetting(Task<string> setting, string scSetting) { if (setting != null && setting.Value != null) { return String.Format(@" {0}= ""{1}""", scSetting, setting.Value); } else { return ""; } }
public Iis6WebSite() { Bindings = new[] {new Iis6WebSiteBinding {Port = 80}}; ScriptMapsToAdd = new Iis6ScriptMap[0]; Authentication = new[] {Iis6Authentication.Basic, Iis6Authentication.NTLM}; AppPool = null; Started = true; AccessFlags = Iis6WebSiteAccessFlags.Read; }
private string GetIncludeExcludeArgument(string argumentName, Task<IEnumerable<string>> categories) { if (categories.Value.Count() > 0) { return "/" + argumentName + "=" + String.Join(",", categories.Value.ToArray()); } else { return ""; } }
public RemoteMachine(Task<string> remoteDeployDirectory, Task<string> localDeployDirectory, Parameter<string> stage, Parameter<string> machineParameter, string machineName) { LocalDeployDirectory = localDeployDirectory; Stage = stage; MachineParameter = machineParameter; MachineName = machineName; ArchiveCopiedToRemote = new Copy { FromPath = ".", ToPath = remoteDeployDirectory, }; }
public VisualStudioSolution() { MsBuildExe = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"); }
public Iis6Task() { Machine = "localhost"; }
private IEnumerable<string> GetValueOf(Task<IEnumerable<string>> paths) { return paths != null ? paths.Value : null; }
public Copy(IFileSystemCopier fileSystemCopier) { FileSystemCopier = fileSystemCopier; DeleteToDirectory = true; }
private ITask GetInvokeRemoteDeploy(Task<string> package) { Task<string> packageAfterDeploy = GetPreparedDeployPackage(package); if (Deploy != null) { return InvokeRemoteDeploy(packageAfterDeploy); } else { return packageAfterDeploy; } }
private static Func<string, string> RewriteVersion(Task<string> version) { Regex asmVersion = new Regex(@"^(\s*\[assembly:\s*Assembly(File)?Version\s*\(\s*"").*?(""\s*\)\s*\])", RegexOptions.Multiline); return contents => { return asmVersion.Replace(contents, match => { return match.Groups[1].Value + version.Value + match.Groups[3].Value; }); }; }
public Task<string> this[Task<string> filename] { get { return new All(Root, filename).WhenBuilt(() => Path.Combine(Root.Value, filename.Value)); } }
public WindowsService() { StartupType = WindowsServiceStartupType.Manual; }
private Task<string> GetPreparedDeployPackage(Task<string> package) { return package.WithDependencyOn(PrepareDeploy(package)); }
public VisualStudioProject(VisualStudioSolution solution, Task<string> name) { Solution = solution; Name = name; }
public DirectoryFiles(Task<string> root) { Root = root; }
public Iis6AppPool() { Identity = new Iis6AppPoolIdentity {IdentityType = Iis6AppPoolIdentityType.NetworkService}; }
public NUnitTests() { NUnitConsolePath = @"c:\Program Files (x86)\NUnit\nunit-console.exe"; ExcludeCategories = new string[0]; IncludeCategories = new string[0]; }
public ITask CreateRemoteBounce(Task<string> bounceArguments, Task<string> workingDirectory, Task<string> machine) { return new SubBounce { BounceArguments = bounceArguments, WorkingDirectory = workingDirectory, }; }
private Task<string> CopyBounceDirectoryIntoPackage(Task<string> package) { Task<string> copiedBounceDirectory = new Copy { FromPath = Path.GetDirectoryName(BounceRunner.TargetsPath), ToPath = package.SubPath("Bounce"), Excludes = Copy.SvnDirectories, }.ToPath; var deletedBeforeBounce = new Delete {Path = copiedBounceDirectory.SubPath("beforebounce.*")}; return copiedBounceDirectory.SubPath("..").WithDependencyOn(deletedBeforeBounce); }