maui-linux/System.Maui.Platform.UAP/FormsUWP.cs

29 строки
632 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Maui.Internals;
namespace System.Maui
{
public static partial class Maui
{
static IReadOnlyList<string> s_flags;
public static IReadOnlyList<string> Flags => s_flags ?? (s_flags = new string [0]);
public static void SetFlags(params string[] flags)
{
if (IsInitialized)
{
throw new InvalidOperationException($"{nameof(SetFlags)} must be called before {nameof(Init)}");
}
s_flags = (string[])flags.Clone();
if (s_flags.Contains ("Profile"))
Profile.Enable();
}
}
}