Community.PowerToys.Run.Plugin.Abstractions
0.1.0
dotnet add package Community.PowerToys.Run.Plugin.Abstractions --version 0.1.0
NuGet\Install-Package Community.PowerToys.Run.Plugin.Abstractions -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Community.PowerToys.Run.Plugin.Abstractions" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Community.PowerToys.Run.Plugin.Abstractions --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Community.PowerToys.Run.Plugin.Abstractions, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Community.PowerToys.Run.Plugin.Abstractions as a Cake Addin #addin nuget:?package=Community.PowerToys.Run.Plugin.Abstractions&version=0.1.0 // Install Community.PowerToys.Run.Plugin.Abstractions as a Cake Tool #tool nuget:?package=Community.PowerToys.Run.Plugin.Abstractions&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Community.PowerToys.Run.Plugin.Abstractions
This NuGet package is intended for PowerToys Run community plugins authors.
It contains abstractions for the Wox
DLLs:
Wox.Infrastructure.dll
Wox.Plugin.dll
In other words, interfaces and wrappers for the static classes:
Wox.Infrastructure.Helper
Wox.Plugin.Common.DefaultBrowserInfo
Wox.Plugin.Logger.Log
Installation
.NET CLI:
dotnet add package Community.PowerToys.Run.Plugin.Abstractions
Package Manager:
PM> NuGet\Install-Package Community.PowerToys.Run.Plugin.Abstractions
PackageReference:
<PackageReference Include="Community.PowerToys.Run.Plugin.Abstractions" Version="0.1.0" />
Example
<ItemGroup>
<InternalsVisibleTo Include="Community.PowerToys.Run.Plugin.Sample.UnitTests" />
</ItemGroup>
using Community.PowerToys.Run.Plugin.Abstractions;
using static Wox.Infrastructure.Helper;
/// <summary>
/// Initializes a new instance of the <see cref="Main"/> class.
/// </summary>
public Main()
{
Helper = new HelperWrapper();
DefaultBrowserInfo = new DefaultBrowserInfoWrapper();
Log = new LogWrapper();
}
internal Main(IHelper helper, IDefaultBrowserInfo defaultBrowserInfo, ILog log)
{
Helper = helper;
DefaultBrowserInfo = defaultBrowserInfo;
Log = log;
}
private IHelper Helper { get; }
private IDefaultBrowserInfo DefaultBrowserInfo { get; }
private ILog Log { get; }
DefaultBrowserInfo.UpdateIfTimePassed();
if (!Helper.OpenCommandInShell(DefaultBrowserInfo.Path, DefaultBrowserInfo.ArgumentsPattern, url))
{
Log.Error("Open default browser failed.", GetType());
Api.ShowMsg($"Plugin: {Metadata.Name}", "Open default browser failed.");
}
[SetUp]
public void SetUp()
{
_subject = new Main(Substitute.For<IHelper>(), Substitute.For<IDefaultBrowserInfo>(), Substitute.For<ILog>());
}
Disclaimer
This is not an official Microsoft PowerToys package.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows7.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0-windows7.0
- Community.PowerToys.Run.Plugin.Dependencies (>= 0.83.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.0 | 166 | 8/12/2024 |
Initial release