/// <summary> /// Initializes a new instance of the <see cref="ProjectInfo" /> class. /// </summary> /// <param name="file">The file.</param> /// <param name="name">The name.</param> /// <param name="assemblyInfoVersion">The assembly information version.</param> /// <param name="nuspecVersion">The nuspec version.</param> public ProjectInfo(FileInfo file, string name, AssemblyInfoVersion assemblyInfoVersion, NuspecVersion nuspecVersion) { File = file; Name = name; AssemblyInfoVersion = assemblyInfoVersion; NuspecVersion = nuspecVersion; }
/// <summary> /// Handles the PropertyChanged event of the NuspecViewModel control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.ComponentModel.PropertyChangedEventArgs"/> instance containing the event data.</param> /// <exception cref="System.NotImplementedException"></exception> private void NuspecViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { if (string.IsNullOrEmpty(File)) { return; } var file = new FileInfo(File); if (!file.Exists) { return; } var version = new NuspecVersion(file) { Version = Version }; version.Write(); }