Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/DiffEngine.Tests/DiffEngineTrayTest.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
public class DiffEngineTrayTest(ITestOutputHelper output) :
#pragma warning disable CS0618 // Type or member is obsolete
public class DiffEngineTrayTest(ITestOutputHelper output) :
XunitContextBase(output)
{
[Fact]
public void IsRunning() =>
Assert.False(DiffEngineTray.IsRunning);
}
}
24 changes: 23 additions & 1 deletion src/DiffEngine/DiffRunner.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
namespace DiffEngine;
#pragma warning disable CS0618 // Type or member is obsolete
namespace DiffEngine;

/// <summary>
/// Manages diff tools processes.
Expand Down Expand Up @@ -64,6 +65,7 @@ public static Task<LaunchResult> LaunchAsync(string tempFile, string targetFile,
targetFile,
encoding);
}

/// <summary>
/// Launch a diff tool for the given paths.
/// </summary>
Expand Down Expand Up @@ -109,6 +111,26 @@ public static LaunchResult Launch(ResolvedTool tool, string tempFile, string tar
encoding);
}

public static void AddDelete(string file)
{
if (Disabled)
{
return;
}

DiffEngineTray.AddDelete(file);
}

public static Task AddDeleteAsync(string file)
{
if (Disabled)
{
return Task.CompletedTask;
}

return DiffEngineTray.AddDeleteAsync(file);
}

public static Task<LaunchResult> LaunchAsync(ResolvedTool tool, string tempFile, string targetFile, Encoding? encoding = null)
{
GuardFiles(tempFile, targetFile);
Expand Down
3 changes: 2 additions & 1 deletion src/DiffEngine/Tray/DiffEngineTray.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace DiffEngine;

[Obsolete("Use DiffRunner")]
public static class DiffEngineTray
{
static DiffEngineTray()
Expand Down Expand Up @@ -72,4 +73,4 @@ public static Task AddMoveAsync(

return PiperClient.SendMoveAsync(tempFile, targetFile, exe, arguments, canKill, processId, cancel);
}
}
}
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<NoWarn>CS1591;CS0649;NU1608;NU1109</NoWarn>
<Version>18.1.2</Version>
<Version>18.2.0</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<PackageTags>Testing, Snapshot, Diff, Compare</PackageTags>
<Description>Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.</Description>
Expand Down