-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
ResourceLoader.cs
39 lines (35 loc) · 1.25 KB
/
ResourceLoader.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#nullable disable
using System;
using System.ComponentModel;
using System.Reflection;
namespace Microsoft.Maui.Controls.Internals
{
/// <include file="../../../docs/Microsoft.Maui.Controls.Internals/ResourceLoader.xml" path="Type[@FullName='Microsoft.Maui.Controls.Internals.ResourceLoader']/Docs/*" />
[EditorBrowsable(EditorBrowsableState.Never)]
public static class ResourceLoader
{
static Func<ResourceLoadingQuery, ResourceLoadingResponse> _resourceProvider2;
/// <include file="../../../docs/Microsoft.Maui.Controls.Internals/ResourceLoader.xml" path="//Member[@MemberName='ResourceProvider2']/Docs/*" />
public static Func<ResourceLoadingQuery, ResourceLoadingResponse> ResourceProvider2
{
get => _resourceProvider2;
internal set
{
DesignMode.IsDesignModeEnabled = value != null;
_resourceProvider2 = value;
}
}
public class ResourceLoadingQuery
{
public AssemblyName AssemblyName { get; set; }
public string ResourcePath { get; set; }
public object Instance { get; set; }
}
public class ResourceLoadingResponse
{
public string ResourceContent { get; set; }
public bool UseDesignProperties { get; set; }
}
internal static Action<(Exception exception, string filepath)> ExceptionHandler2 { get; set; }
}
}