public DownloadAppInstaller(IConsoleLogger consoleLogger, IPowerShell powerShell, IDownloaderFactory downloaderFactory) { this.consoleLogger = consoleLogger; this.powerShell = powerShell; this.downloaderFactory = downloaderFactory; }
public GitHubAssetDownloader(IJsonSerializer jsonSerializer, IPowerShell powerShell, IResourceDownloader resourceDownloader) { this.jsonSerializer = jsonSerializer; this.powerShell = powerShell; this.resourceDownloader = resourceDownloader; }
public AgentPool(PSObject obj, IPowerShell powerShell) : base(obj, obj.GetValue("name"), "Agent", powerShell, null) { if (this.IsHosted) { this.DisplayMode = "d-r-s-"; } ; }
public GitRepository(PSObject obj, string projectName, IPowerShell powerShell) : base(obj, obj.GetValue("Name"), "GitRef", powerShell, projectName) { if (obj.HasValue("project")) { this.Project = new Project(obj.GetValue <PSObject>("project"), powerShell); this.ProjectName = this.Project.Name; } }
/// <summary> /// Used for testing /// </summary> public Package(PSObject obj, string feedId, IPowerShell powerShell) : base(obj, obj.GetValue("name"), "Version", powerShell, null) { this.FeedId = feedId; if (obj.HasValue("_links")) { this.Links = new Link(obj); } }
public static string GetDefaultProject(IPowerShell powerShell) { powerShell.Commands.Clear(); var results = powerShell.AddScript("$Global:PSDefaultParameterValues[\"*-vsteam*:projectName\"]") .Invoke <string>(); PowerShellWrapper.LogPowerShellError(powerShell, results); return(results[0]); }
public Environment(PSObject obj, long releaseId, string projectName, IPowerShell powerShell) : base(obj, obj.GetValue("name"), "Attempt", powerShell, projectName) { this.ReleaseId = releaseId; this.Attempts = new List <Attempt>(); foreach (var item in obj.GetValue <object[]>("deploySteps")) { this.Attempts.Add(new Attempt((PSObject)item, this.ProjectName)); } }
public Release(PSObject obj, IPowerShell powerShell, string projectName) : base(obj, obj.GetValue("name"), "Release", powerShell, projectName) { this.CreatedBy = new User(obj.GetValue <PSObject>("createdBy")); this.ModifiedBy = new User(obj.GetValue <PSObject>("modifiedBy")); this.Project = new Project(obj.GetValue <PSObject>("projectReference"), powerShell); this.PopulateEnvironments(obj); this.ReleaseDefinition = new ReleaseDefinition(obj.GetValue <PSObject>("releaseDefinition"), projectName); }
public BuildDefinitionProcessPhase(PSObject obj, string projectName, IPowerShell powerShell) : base(obj, obj.GetValue("name"), "BuildDefinitionProcessPhase", powerShell, projectName) { this.Steps = new List <BuildDefinitionProcessPhaseStep>(); if (obj.HasValue("steps")) { var i = 1; foreach (var item in obj.GetValue <object[]>("steps")) { this.Steps.Add(new BuildDefinitionProcessPhaseStep((PSObject)item, i++, projectName)); } this.StepCount = this.Steps.Count; } }
public BuildDefinitionProcess(PSObject obj, string projectName, IPowerShell powerShell) : base(obj, "Process", string.Empty, powerShell, projectName) { if (this.Type == 1) { this.TypeName = "BuildDefinitionPhasedProcess"; this.Phases = new List <BuildDefinitionProcessPhase>(); foreach (var item in obj.GetValue <object[]>("phases")) { this.Phases.Add(new BuildDefinitionProcessPhase((PSObject)item, projectName, powerShell)); } } else { this.DisplayMode = "------"; this.TypeName = "BuildDefinitionYamlProcess"; } }
public Build(PSObject obj, string projectName, IPowerShell powerShell) : base(obj, obj.GetValue("buildNumber"), obj.GetValue("Id"), projectName) { this.TriggerInfo = obj.GetValue <PSObject>("TriggerInfo"); this.RequestedBy = new User(obj.GetValue <PSObject>("requestedBy")); this.RequestedFor = new User(obj.GetValue <PSObject>("requestedFor")); this.LastChangedBy = new User(obj.GetValue <PSObject>("lastChangedBy")); this.Project = new Project(obj.GetValue <PSObject>("project"), powerShell); // When you try to use Get-VSTeamBuild on the build that is running sometimes // the queue is not present yet if (obj.HasValue("queue")) { this.Queue = new Queue(obj.GetValue <PSObject>("queue"), projectName, powerShell); } this.BuildDefinition = new BuildDefinition(obj.GetValue <PSObject>("definition"), projectName, powerShell); }
public BuildDefinition(PSObject obj, string projectName, IPowerShell powerShell) : base(obj, obj.GetValue("name"), "BuildDefinition", powerShell, projectName) { this.Tags = obj.GetStringArray("tags"); this.Demands = obj.GetStringArray("demands"); if (obj.HasValue("authoredBy")) { this.AuthoredBy = new User(obj.GetValue <PSObject>("authoredBy")); } // Depending on the build definition you might have a build or // process element. if (obj.HasValue("build")) { var i = 1; this.Steps = new List <BuildDefinitionProcessPhaseStep>(); foreach (var item in obj.GetValue <object[]>("build")) { this.Steps.Add(new BuildDefinitionProcessPhaseStep((PSObject)item, i++, projectName)); } } if (obj.HasValue("process")) { this.Process = new BuildDefinitionProcess(obj.GetValue <PSObject>("process"), projectName, powerShell); } if (obj.HasValue("queue")) { this.Queue = new Queue(obj.GetValue <PSObject>("queue"), this.ProjectName, powerShell); } if (this.RepositoryType == "TfsGit") { this.GitRepository = new GitRepository(obj.GetValue <PSObject>("repository"), this.ProjectName, powerShell); } }
public Permissions(string name, IPowerShell powerShell) : base(name, null, powerShell) { }
/// <summary> /// This constructor is used during unit testings /// </summary> /// <param name="powerShell">fake instance of IPowerShell used for testing</param> internal WorkItemTypeCompleter(IPowerShell powerShell) : base("Get-VSTeamWorkItemType", "Name", false, powerShell) { }
public WingetCliInstaller(IDownloadAppInstaller downloadAppInstaller, IPowerShell powerShell) { this.downloadAppInstaller = downloadAppInstaller; this.powerShell = powerShell; }
public Releases(IPowerShell powerShell, string projectName) : base(null, "Releases", "Release", powerShell, projectName) { }
public Queue(PSObject obj, string projectName, IPowerShell powerShell) : base(obj, obj.GetValue("name"), obj.GetValue("id"), projectName) { this.Pool = new AgentPool(obj.GetValue <PSObject>("pool"), powerShell); }
public PowerShellConfiguration(IPowerShell powerShell, IWindowsPowerShell windowsPowerShell, IConsoleLogger consoleLogger) { this.powerShell = powerShell; this.windowsPowerShell = windowsPowerShell; this.consoleLogger = consoleLogger; }
/// <summary> /// This constructor is used during unit testings /// </summary> /// <param name="powerShell">fake instance of IPowerShell used for testing</param> public ProcessTemplateCompleter(IPowerShell powerShell) : base(powerShell) { }
public Agent(PSObject obj, long poolId, IPowerShell powerShell) : base(obj, obj.GetValue("name"), "JobRequest", powerShell, null) { this.PoolId = poolId; }
/// <summary> /// This constructor is used during unit testings /// </summary> /// <param name="powerShell">fake instance of IPowerShell used for testing</param> public InvokeCompleter(IPowerShell powerShell) : base(powerShell) { }
/// <summary> /// This constructor is used during unit testings /// </summary> /// <param name="powerShell">fake instance of IPowerShell used for testing</param> protected BaseProjectCompleter(string command, string property, bool descending, IPowerShell powerShell) : base(powerShell) { this._command = command; this._property = property; this._descending = descending; }
/// <summary> /// Used for testing /// </summary> public Project(PSObject obj, IPowerShell powerShell) : base(obj, obj.GetValue("name"), null, powerShell, obj.GetValue("name")) { }
/// <summary> /// This is called by unit testing framework and other constructors /// </summary> /// <param name="name"></param> /// <param name="powerShell"></param> public Account(string name, IPowerShell powerShell) : base(name, "Project", powerShell) { // Invalidate any cache of projects ProjectCache.Invalidate(); }
/// <summary> /// This constructor is used during unit testings /// </summary> /// <param name="powerShell">fake instance of IPowerShell used for testing</param> internal BuildDefinitionCompleter(IPowerShell powerShell) : base("Get-VSTeamBuildDefinition", "Name", false, powerShell) { }
/// <summary> /// This constructor is used during unit testings /// </summary> /// <param name="powerShell">fake instance of IPowerShell used for testing</param> protected BaseCompleter(IPowerShell powerShell) { this._powerShell = powerShell; }
/// <summary> /// This constructor is used during unit testings /// </summary> /// <param name="powerShell">fake instance of IPowerShell used for testing</param> internal QueryCompleter(IPowerShell powerShell) : base("Get-VSTeamQuery", "Name", false, powerShell) { }
public TimeZoneCompleter(IPowerShell powerShell) : base(powerShell) { }
/// <summary> /// This constructor is used during unit testings /// </summary> /// <param name="powerShell">fake instance of IPowerShell used for testing</param> internal BuildCompleter(IPowerShell powerShell) : base("Get-VSTeamBuild", "BuildNumber", true, powerShell) { }
public AppInstaller(IPowerShell powerShell, IConsoleLogger consoleLogger, IDesktopRepository desktopRepository) { this.powerShell = powerShell; this.consoleLogger = consoleLogger; this.desktopRepository = desktopRepository; }