/// <summary> /// Gets the build name. /// </summary> /// <param name="project">The project.</param> /// <param name="build">The build.</param> /// <returns>The build name.</returns> public static string GetBuildName(IProject project, IBuild build) { Ensure.That(project).IsNotNull(); Ensure.That(build).IsNotNull(); return(GetBuildName(project.Name, build.VersionNumber())); }
/// <summary> /// Initializes a new instance of the <see cref="BuildNotificationViewModel" /> class. /// </summary> /// <param name="application">The application.</param> /// <param name="buildViewModelFactory">The build view model factory.</param> /// <param name="project">The project.</param> /// <param name="build">The build.</param> public BuildNotificationViewModel(IApp application, IBuildViewModelFactory buildViewModelFactory, IProject project, IBuild build) { Ensure.That(application).IsNotNull(); Ensure.That(buildViewModelFactory).IsNotNull(); Ensure.That(project).IsNotNull(); Ensure.That(build).IsNotNull(); _application = application; Build = buildViewModelFactory.Create(project.Name, build.Id, build.Branch, build.VersionNumber(), build.RequestedBy, build.Changes, build.Status, build.StartTime, build.EndTime, build.RunTime(), build.WebUrl); StartClosing(); }