/// <summary> /// Initializes the <see cref="BuildInfoViewModel"/> with the specified <see cref="BuildInfoModel"/>. /// </summary> /// <param name="buildInfoModel">The model that is encapsulated by the <see cref="BuildInfoViewModel"/>.</param> private void Init(BuildInfoModel buildInfoModel) { this.DataModel = buildInfoModel; this.DataModel.PropertyChanged += (sender, e) => this.UpdateFromModel(); this.Description = this.DataModel.Description; this.Status = BuildStatus.Loading; this.LatestStatus = BuildStatus.Loading.ToFriendlyString(); this.HasWarnings = false; }
public void TestInitialize() { string teamProject = "Team Project"; string definitionName = "Definition Name"; string configuration = "Configuration"; string platform = "Platform"; this.key = string.Format("{0};{1}", teamProject, definitionName); this.mockService = new MockBuildServerService(); this.mockBuildInfo = new MockBuildInfo(BuildStatus.Stopped, "Requested For", DateTime.MinValue, true, DateTime.MinValue); this.model = new BuildInfoModel(teamProject, definitionName, configuration, platform, this.mockService); this.viewModel = new BuildInfoViewModel(this.model); }
public static BuildInfoViewModel FromString(string s, IBuildServerService service) { return(new BuildInfoViewModel(BuildInfoModel.FromString(s, service))); }
/// <summary> /// Initializes a new instance of the <see cref="BuildInfoViewModel"/> class. /// </summary> /// <param name="buildInfoModel">The model underlying the <see cref="BuildInfoViewModel"/>.</param> public BuildInfoViewModel(BuildInfoModel buildInfoModel) { this.Init(buildInfoModel); }