/ src / modules / cmdpal / ext / SamplePagesExtension / SelfImmolateCommand.cs
SelfImmolateCommand.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using System.Diagnostics;
 6  using Microsoft.CommandPalette.Extensions;
 7  using Microsoft.CommandPalette.Extensions.Toolkit;
 8  
 9  namespace SamplePagesExtension;
10  
11  public partial class SelfImmolateCommand : InvokableCommand
12  {
13      public override ICommandResult Invoke()
14      {
15          Process.GetCurrentProcess().Kill();
16          return CommandResult.KeepOpen();
17      }
18  }