public override RichDescription GetDescription() { var description = new RichDescription( "Collection: ", new Hilite(this.CollectionName ?? (this.CollectionId.ToString())) ); if (string.IsNullOrWhiteSpace(this.CustomWiql)) { if (!string.IsNullOrWhiteSpace(this.ProjectName)) { description.AppendContent( ", Project: ", new Hilite(this.ProjectName) ); if (!string.IsNullOrWhiteSpace(this.AreaPath)) { description.AppendContent( ", Area: ", new Hilite(this.AreaPath) ); } } } else { description.AppendContent(", custom query"); } return(description); }
public override ExtendedRichDescription GetActionDescription() { var shortDesc = new RichDescription("Import VS Online Build Artifact from ", new Hilite(this.TeamProject)); var longDesc = new RichDescription("using "); if (string.IsNullOrEmpty(this.BuildNumber)) { longDesc.AppendContent("the last successful build"); } else { longDesc.AppendContent("build ", new Hilite(this.BuildNumber)); } longDesc.AppendContent(" of "); if (string.IsNullOrEmpty(this.BuildDefinition)) { longDesc.AppendContent("any build definition"); } else { longDesc.AppendContent("build definition ", new Hilite(this.BuildDefinition)); } longDesc.AppendContent("."); return(new ExtendedRichDescription(shortDesc, longDesc)); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var simple = new RichDescription("Promote ", new Hilite(config[nameof(BuildName)]), " (", new Hilite(config[nameof(BuildNumber)]), ") (Status: ", new Hilite(config[nameof(Status)]), ")"); var extended = new RichDescription(); if (!string.IsNullOrEmpty(config[nameof(FromRepository)])) { if (string.Equals(config[nameof(Copy)], "true", StringComparison.OrdinalIgnoreCase)) { extended.AppendContent("copy artifacts"); } else { extended.AppendContent("move artifacts"); } if (config[nameof(Scopes)].AsEnumerable().Any()) { extended.AppendContent(" and dependencies (", string.Join(", ", config[nameof(Scopes)].AsEnumerable()), ")"); } extended.AppendContent(" from ", new Hilite(config[nameof(FromRepository)])); if (!string.IsNullOrEmpty(config[nameof(ToRepository)])) { extended.AppendContent(" to ", new Hilite(config[nameof(ToRepository)])); } } return(new ExtendedRichDescription(simple, extended)); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var summary = new RichDescription("Ensure "); var version = config[nameof(this.Template.Version)]; if (!string.IsNullOrEmpty(version)) { if (string.Equals(version, "latest", StringComparison.OrdinalIgnoreCase)) { summary.AppendContent(new Hilite("latest"), " version of "); } else { summary.AppendContent("version ", new Hilite(version), " of "); } } summary.AppendContent("Chocolatey is installed"); var details = new RichDescription(); if (!string.IsNullOrEmpty(config[nameof(this.Template.Source)])) { details.AppendContent("from ", new Hilite(config[nameof(this.Template.Source)])); } return(new ExtendedRichDescription(summary, details)); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { string title = config[nameof(this.Title)]; string description = config[nameof(this.Description)]; string iteration = config[nameof(this.IterationPath)]; string state = config[nameof(this.State)]; var longDescription = new RichDescription(); if (!string.IsNullOrEmpty(title)) { longDescription.AppendContent("Title = ", new Hilite(title), "; "); } if (!string.IsNullOrEmpty(description)) { longDescription.AppendContent("Description = ", new Hilite(description), "; "); } if (!string.IsNullOrEmpty(iteration)) { longDescription.AppendContent("Iteration = ", new Hilite(iteration), "; "); } if (!string.IsNullOrEmpty(state)) { longDescription.AppendContent("State = ", new Hilite(state), "; "); } return(new ExtendedRichDescription( new RichDescription("Update TFS Work Item"), longDescription )); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var extended = new RichDescription(); var framework = config[nameof(Framework)]; var output = config[nameof(Output)]; if (!string.IsNullOrWhiteSpace(framework)) { extended.AppendContent("Framework: ", new Hilite(framework)); if (!string.IsNullOrWhiteSpace(output)) { extended.AppendContent(", "); } } if (!string.IsNullOrWhiteSpace(output)) { extended.AppendContent("Output: ", new DirectoryHilite(output)); } return(new ExtendedRichDescription( new RichDescription( $"dotnet {this.CommandName} ", new DirectoryHilite(config[nameof(ProjectPath)]) ), extended )); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var shortDesc = new RichDescription("Import VSO ", new Hilite(config[nameof(this.ArtifactName)]), " Artifact"); var longDesc = new RichDescription("from ", new Hilite(config[nameof(this.TeamProject)]), " using "); if (string.IsNullOrEmpty(config[nameof(this.BuildNumber)])) { longDesc.AppendContent("the last successful build"); } else { longDesc.AppendContent("build ", new Hilite(config[nameof(this.BuildNumber)])); } longDesc.AppendContent(" of "); if (string.IsNullOrEmpty(config[nameof(this.BuildDefinition)])) { longDesc.AppendContent("any build definition"); } else { longDesc.AppendContent("build definition ", new Hilite(config[nameof(this.BuildDefinition)])); } longDesc.AppendContent("."); return(new ExtendedRichDescription(shortDesc, longDesc)); }
public override RichDescription GetDescription() { var desc = new RichDescription(this.UserName); if (!string.IsNullOrEmpty(this.Domain)) { desc.AppendContent("@", this.Domain); } return(desc); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { if (string.IsNullOrWhiteSpace(config.DefaultArgument)) { return(new ExtendedRichDescription(new RichDescription("PSVerify {error parsing statement}"))); } var defaultArg = config.DefaultArgument; var longDesc = new RichDescription(); bool longDescInclused = false; var scriptName = LooselyQualifiedName.TryParse(defaultArg); if (scriptName != null) { var info = PowerShellScriptInfo.TryLoad(scriptName); if (!string.IsNullOrEmpty(info?.Description)) { longDesc.AppendContent(info.Description); longDescInclused = true; } var listParams = new List <string>(); foreach (var prop in config.NamedArguments) { listParams.Add($"{prop.Key}: {prop.Value}"); } foreach (var prop in config.OutArguments) { listParams.Add($"{prop.Key} => {prop.Value}"); } if (listParams.Count > 0) { if (longDescInclused) { longDesc.AppendContent(" - "); } longDesc.AppendContent(new ListHilite(listParams)); longDescInclused = true; } } if (!longDescInclused) { longDesc.AppendContent("with no parameters"); } return(new ExtendedRichDescription( new RichDescription("PSVerify ", new Hilite(defaultArg)), longDesc )); }
public override RichDescription GetDescription() { var desc = new RichDescription(AH.CoalesceString(this.UserName, "Anonymous"), "@", "GitLab"); if (!string.IsNullOrEmpty(this.GroupName)) { desc.AppendContent(",Group=", this.GroupName); } return(desc); }
public override RichDescription GetDescription() { var desc = new RichDescription(this.UserName, "@", "GitHub"); if (!string.IsNullOrEmpty(this.OrganizationName)) { desc.AppendContent(",Organization=", this.OrganizationName); } return(desc); }
public override RichDescription GetDescription() { var desc = new RichDescription("Import "); if (!string.IsNullOrEmpty(this.BuildNumber)) { desc.AppendContent(new Hilite(this.BuildNumber)); } desc.AppendContent(" from ", new Hilite(this.JobName)); return(desc); }
protected sealed override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var services = config[nameof(Services)].AsEnumerable(); var details = new RichDescription(); var verb = this.PrepareDescription(config, details); var shortDescription = new RichDescription( new Hilite(verb), " ", services.Any() ? (object)new ListHilite(services) : new Hilite("all services"), " for ", new Hilite(config[nameof(ProjectName)]) ); return(new ExtendedRichDescription(shortDescription, details)); }
public override ExtendedRichDescription GetActionDescription() { var longDesc = new RichDescription("in ", new DirectoryHilite(this.OverriddenSourceDirectory)); if (!string.IsNullOrEmpty(this.Arguments)) { longDesc.AppendContent(" with arguments ", new Hilite(this.Arguments)); } return(new ExtendedRichDescription( new RichDescription("Execute ", new Hilite(PathEx.GetFileName(this.ExePath))), longDesc )); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var details = new RichDescription(); if (bool.TryParse(config[nameof(this.Template.Exists)], out var enabled)) { details.AppendContent("is ", new Hilite(enabled ? "enabled" : "disabled")); } return(new ExtendedRichDescription( new RichDescription("Ensure Chocolatey feature ", new Hilite(config[nameof(this.Template.Feature)])), details )); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var extended = new RichDescription(); if (!string.IsNullOrEmpty(config[nameof(Filter)])) { extended.AppendContent("filtering by ", new Hilite(config[nameof(Filter)])); } return(new ExtendedRichDescription( new RichDescription( "Find YouTrack issues in ", new Hilite(config[nameof(Project)]), " to ", new Hilite(config[nameof(Output)].ToString()) ), extended )); }
public override RichDescription GetDescription() { var desc = new RichDescription("Import "); if (this.BuildNumberLocked) { desc.AppendContent(this.IncludeUnsuccessful ? "last completed build" : "last succeeded build"); } else { desc.AppendContent("a specific build number"); } desc.AppendContent(" using build definition ", new Hilite(this.BuildDefinition)); desc.AppendContent(" from the ", new Hilite(this.TeamProject), " team project"); return(desc); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var shortDesc = new RichDescription("Ensure IIS Site: ", new Hilite(config[nameof(IisSiteConfiguration.Name)])); string appPool = config[nameof(IisSiteConfiguration.ApplicationPoolName)]; string vdir = config[nameof(IisSiteConfiguration.VirtualDirectoryPhysicalPath)]; bool explicitDoesNotExist = string.Equals(config[nameof(IisSiteConfiguration.Exists)], "false", StringComparison.OrdinalIgnoreCase); if (string.IsNullOrEmpty(appPool) || string.IsNullOrEmpty(vdir) || explicitDoesNotExist) { return(new ExtendedRichDescription(shortDesc, new RichDescription("does not exist"))); } else { return(new ExtendedRichDescription(shortDesc, new RichDescription("application pool ", new Hilite(appPool), "; virtual directory path: ", new Hilite(vdir)))); } }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var startInfo = GetFileNameAndArguments(config[nameof(FileName)], config[nameof(Arguments)], config[nameof(Target)]); var shortDesc = new RichDescription( "Execute ", new DirectoryHilite(startInfo?.FileName), " ", new Hilite(startInfo?.Arguments) ); var longDesc = new RichDescription( "in ", new DirectoryHilite(config[nameof(WorkingDirectory)]) ); return(new ExtendedRichDescription(shortDesc, longDesc)); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var desc = new RichDescription( "Stop ", new Hilite(config[nameof(ContainerName)]), " container" ); if (string.Equals(config[nameof(Remove)], "true", StringComparison.OrdinalIgnoreCase)) { return(new ExtendedRichDescription(desc, new RichDescription("and delete container"))); } else { return(new ExtendedRichDescription(desc)); } }
public override ExtendedRichDescription GetActionDescription() { var ldesc = new RichDescription("in Jenkins"); if (!string.IsNullOrEmpty(this.AdditionalParameters)) { ldesc.AppendContent(" with additional parameters ", new Hilite(this.AdditionalParameters)); } if (this.WaitForCompletion) { ldesc.AppendContent(" and ", new Hilite("wait"), " for completion"); } return(new ExtendedRichDescription( new RichDescription("Trigger ", new Hilite(this.JobName), " Build"), ldesc )); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var extended = new RichDescription(); var output = config[nameof(Output)]; if (!string.IsNullOrWhiteSpace(output)) { extended.AppendContent("Output: ", new DirectoryHilite(output)); } return(new ExtendedRichDescription( new RichDescription( "dotnet pack ", new DirectoryHilite(config[nameof(ProjectPath)]) ), extended )); }
public override RichDescription GetDescription() { var desc = new RichDescription("Import the "); desc.AppendContent(new Hilite(this.ArtifactName)); desc.AppendContent(" artifact from TeamCity build configuration "); desc.AppendContent(new Hilite(this.BuildConfigurationDisplayName)); if (!string.IsNullOrEmpty(this.BuildNumber)) { desc.AppendContent(" using the special build type: "); desc.AppendContent(new Hilite(this.BuildNumber)); } else { desc.AppendContent(" requiring a special build type or specific build number to be selected at build import time."); } return(desc); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var shortDesc = new RichDescription( "Ensure ", new Hilite(config[nameof(IisApplicationConfiguration.ApplicationPath)]), " Application"); var longDesc = new RichDescription( "on site ", new Hilite(config[nameof(IisApplicationConfiguration.SiteName)])); if (string.Equals(config[nameof(IisApplicationConfiguration.Exists)], bool.FalseString, StringComparison.OrdinalIgnoreCase)) { longDesc.AppendContent("does not exist"); return(new ExtendedRichDescription(shortDesc, longDesc)); } return(new ExtendedRichDescription(shortDesc, longDesc)); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { RichDescription desc; var fileName = config[nameof(PackageFile)]; if (!string.IsNullOrWhiteSpace(fileName)) { desc = new RichDescription( "Determine if ", new DirectoryHilite(fileName), " exists as a valid universal package" ); } else { desc = new RichDescription( "Determine if ", new Hilite(config[nameof(PackageName)]) ); var version = config[nameof(PackageVersion)]; if (!string.IsNullOrWhiteSpace(version)) { desc.AppendContent( " ", new Hilite(version) ); } desc.AppendContent( " exists on ", new Hilite(config[nameof(FeedUrl)]) ); } return(new ExtendedRichDescription( desc, new RichDescription( "and set variables ", new ListHilite(new[] { config[nameof(Exists)], config[nameof(Metadata)] }.Select(v => v.ToString()).Where(v => !string.IsNullOrEmpty(v))) ) )); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var longActionDescription = new RichDescription(); if (!string.IsNullOrWhiteSpace(config[nameof(this.AdditionalArguments)])) { longActionDescription.AppendContent( "with additional arguments: ", new Hilite(config[nameof(this.AdditionalArguments)]) ); } return new ExtendedRichDescription( new RichDescription( "Run NUnit on ", new DirectoryHilite(config[nameof(this.TestFile)]) ), longActionDescription ); }
protected RichDescription GetLongDescription(IOperationConfiguration config) { var description = new RichDescription(); var applicationNames = config[nameof(ApplicationNames)].AsEnumerable(); if (bool.TryParse(AH.CoalesceString(config[nameof(IncludeGlobal)].ToString(), bool.TrueString), out bool includeGlobal) && includeGlobal) { description.AppendContent("with ", new Hilite("global"), " items"); if (applicationNames.Any()) { description.AppendContent(" and items from ", new ListHilite(applicationNames)); } } else { description.AppendContent("with items from ", new ListHilite(applicationNames)); } return(description); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var longDesc = new RichDescription(); var attachments = config[nameof(Attachments)].AsEnumerable()?.ToList(); if (attachments != null && attachments.Count > 0) { longDesc.AppendContent( "with attachments ", new ListHilite(attachments), " " ); if (!string.IsNullOrEmpty(config[nameof(SourceDirectory)])) { longDesc.AppendContent( "in ", new DirectoryHilite(config[nameof(SourceDirectory)]) ); } } var text = AH.CoalesceString((string)config[nameof(BodyHtml)], (string)config[nameof(BodyText)]); if (!string.IsNullOrWhiteSpace(text)) { longDesc.AppendContent( "starting with ", new Hilite(text) ); } return(new ExtendedRichDescription( new RichDescription( "Send email to ", new ListHilite(config[nameof(To)]), " with subject ", new Hilite(AH.CoalesceString(config[nameof(Subject)], "(no subject)")) ), longDesc )); }
public override ExtendedRichDescription GetActionDescription() { var longActionDescription = new RichDescription(); if (!string.IsNullOrWhiteSpace(this.AdditionalArguments)) { longActionDescription.AppendContent( "with additional arguments: ", new Hilite(this.AdditionalArguments) ); } return(new ExtendedRichDescription( new RichDescription( "Run NUnit on ", new DirectoryHilite(this.OverriddenSourceDirectory, this.TestFile) ), longActionDescription )); }
protected override ExtendedRichDescription GetDescription(IOperationConfiguration config) { var shortDesc = new RichDescription("SHCall ", new Hilite(config[nameof(this.ScriptName)])); var args = config[nameof(this.Arguments)]; if (string.IsNullOrWhiteSpace(args)) { return(new ExtendedRichDescription(shortDesc)); } else { return(new ExtendedRichDescription( shortDesc, new RichDescription( "with arguments ", new Hilite(args) ) )); } }