| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
A custom tool can be added by calling DiffTools.AddTool
var resolvedTool = DiffTools.AddTool(
name: "MyCustomDiffTool",
autoRefresh: true,
isMdi: false,
supportsText: true,
requiresTarget: true,
useShellExecute: true,
launchArguments: new(
Left: (tempFile, targetFile) => $"\"{targetFile}\" \"{tempFile}\"",
Right: (tempFile, targetFile) => $"\"{tempFile}\" \"{targetFile}\""),
exePath: diffToolPath,
binaryExtensions: [".jpg"])!;Add a tool based on existing resolved tool:
var resolvedTool = DiffTools.AddToolBasedOn(
DiffTool.VisualStudio,
name: "MyCustomDiffTool",
launchArguments: new(
Left: (temp, target) => $"\"custom args \"{target}\" \"{temp}\"",
Right: (temp, target) => $"\"custom args \"{temp}\" \"{target}\""))!;New tools are added to the top of the order, the last tool added will resolve before any existing tools. So when the following is executed the last tool that supports the file types will launch:
await DiffRunner.LaunchAsync(tempFile, targetFile);Alternatively the instance returned from AddTool* can be used to explicitly launch that tool.
var resolvedTool = DiffTools.AddToolBasedOn(
DiffTool.VisualStudio,
name: "MyCustomDiffTool",
launchArguments: new(
Left: (temp, target) => $"\"custom args \"{target}\" \"{temp}\"",
Right: (temp, target) => $"\"custom args \"{temp}\" \"{target}\""));
await DiffRunner.LaunchAsync(resolvedTool!, "PathToTempFile", "PathToTargetFile");exePath is the path to the executable.
If the file cannot be found AddTool* will return null.
So for example %ProgramFiles(x86)%\Microsoft Visual Studio\*\*\Common7\IDE\devenv.exe might discover the following:
Then C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe will be used.
| Back | FazBrowse Home | New Git URL |