public void OnExecute() { if (string.IsNullOrEmpty(NewSet)) { // Reset the filter to be unchanged if we only have a single set so that it will // simply output the contents of the set. Removed = Added = false; Unchanged = true; } if (!Added && !Removed && !Changed && !Unchanged) { // If the user didn't explicitly specify what to include we default to changes only. Added = Removed = Changed = true; } DiffConfigurationOptions options = GetDiffOptions(); DiffFormat diffFormat = GetDiffFormat(); AssemblySet oldAssemblies = AssemblySet.FromPaths(OldSet); AssemblySet newAssemblies = AssemblySet.FromPaths(NewSet); DiffConfiguration diffConfiguration = new DiffConfiguration(oldAssemblies, newAssemblies, options); using (TextWriter output = GetOutput()) DiffEngine.Export(diffConfiguration, null, diffFormat, output); }
public void OnExecute() { if (string.IsNullOrEmpty(NewSet)) { // Reset the filter to be unchanged if we only have a single set so that it will // simply output the contents of the set. Removed = Added = false; Unchanged = true; } if (!Added && !Removed && !Changed && !Unchanged) { // If the user didn't explicitly specify what to include we default to changes only. Added = Removed = Changed = true; } if (!string.IsNullOrEmpty(Language)) { var cultureInfo = System.Globalization.CultureInfo.GetCultureInfo(Language); Thread.CurrentThread.CurrentCulture = cultureInfo; Thread.CurrentThread.CurrentUICulture = cultureInfo; } DiffConfigurationOptions options = GetDiffOptions(); DiffFormat diffFormat = GetDiffFormat(); AssemblySet oldAssemblies = AssemblySet.FromPaths(OldSetName, OldSet); AssemblySet newAssemblies = AssemblySet.FromPaths(NewSetName, NewSet); DiffConfiguration diffConfiguration = new DiffConfiguration(oldAssemblies, newAssemblies, options); if (diffFormat == DiffFormat.Md) { DiffDocument diffDocument = DiffEngine.BuildDiffDocument(diffConfiguration); var markdownDiffExporter = new MarkdownDiffExporter(diffDocument, OutFile, IncludeTableOfContents, CreateFilePerNamespace); markdownDiffExporter.Export(); } else { using (TextWriter output = GetOutput()) DiffEngine.Export(diffConfiguration, null, diffFormat, output); } }