mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[Peek]Add wrap and formatting options for Monaco previewer (#29378)
* add options for monaco previewer * fix formatting
This commit is contained in:
committed by
GitHub
parent
9693fd7035
commit
5a06bcb473
@@ -0,0 +1,19 @@
|
||||
// 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.
|
||||
|
||||
using Microsoft.UI.Xaml;
|
||||
|
||||
namespace Peek.Common.Extensions
|
||||
{
|
||||
public static class ApplicationExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Get registered services at the application level from anywhere
|
||||
public static T GetService<T>(this Application application)
|
||||
where T : class
|
||||
{
|
||||
return (application as IApp)!.GetService<T>();
|
||||
}
|
||||
}
|
||||
}
|
||||
12
src/modules/peek/Peek.Common/IApp.cs
Normal file
12
src/modules/peek/Peek.Common/IApp.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
// 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 Peek.Common
|
||||
{
|
||||
public interface IApp
|
||||
{
|
||||
public T GetService<T>()
|
||||
where T : class;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user