public async void QueueBuild() { var selectedDefinition = _definitions.First();//await _dialogs.ShowSelectionDialogAsync("Queue a new build", "Definitions", _definitions); if (selectedDefinition == null) { return; } var queuedBuild = await _teamServices.QueueBuildAsync(Project, new BuildRequest { Definition = selectedDefinition, SourceBranch = "master" }); Builds.Insert(0, new BuildViewModel(queuedBuild)); }
/// <summary> /// Adds a new build for tracking /// </summary> /// <param name="Stream">The stream containing the build</param> /// <param name="Build">The build to add</param> public void AddBuild(string Stream, BuildHealthJobStep Build) { // Get the list of tracked builds for this stream List <BuildHealthJobStep> Builds; if (!Streams.TryGetValue(Stream, out Builds)) { Builds = new List <BuildHealthJobStep>(); Streams.Add(Stream, Builds); } // Add this build to the tracked state data int BuildIdx = Builds.BinarySearch(Build); if (BuildIdx < 0) { BuildIdx = ~BuildIdx; Builds.Insert(BuildIdx, Build); } }