Files
PowerToys/src/modules/Deux/SDK/Microsoft.CommandPalette.Extensions.Toolkit/Commands/OpenUrlCommand.cs
2025-12-05 10:21:47 -06:00

26 lines
709 B
C#

// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.CommandPalette.Extensions.Toolkit;
public partial class OpenUrlCommand : InvokableCommand
{
private readonly string _target;
public CommandResult Result { get; set; } = CommandResult.KeepOpen();
public OpenUrlCommand(string target)
{
_target = target;
Name = Properties.Resources.OpenUrlCommand_Open;
Icon = new IconInfo("\uE8A7");
}
public override CommandResult Invoke()
{
ShellHelpers.OpenInShell(_target);
return Result;
}
}