maui-linux/Xamarin.Forms.Core/Performance.cs

34 строки
990 B
C#
Исходник Обычный вид История

using System.ComponentModel;
2016-03-22 23:02:25 +03:00
using System.Runtime.CompilerServices;
namespace Xamarin.Forms.Internals
2016-03-22 23:02:25 +03:00
{
[EditorBrowsable(EditorBrowsableState.Never)]
public interface IPerformanceProvider
2016-03-22 23:02:25 +03:00
{
void Stop(string reference, string tag, string path, string member);
2016-03-22 23:02:25 +03:00
void Start(string reference, string tag, string path, string member);
}
2016-03-22 23:02:25 +03:00
[EditorBrowsable(EditorBrowsableState.Never)]
public class Performance
{
public static IPerformanceProvider Provider { get; private set; }
2016-03-22 23:02:25 +03:00
public static void SetProvider(IPerformanceProvider instance)
2016-03-22 23:02:25 +03:00
{
Provider = instance;
2016-03-22 23:02:25 +03:00
}
public static void Start(string reference, string tag = null, [CallerFilePath] string path = null, [CallerMemberName] string member = null)
2016-03-22 23:02:25 +03:00
{
Provider?.Start(reference, tag, path, member);
2016-03-22 23:02:25 +03:00
}
public static void Stop(string reference, string tag = null, [CallerFilePath] string path = null, [CallerMemberName] string member = null)
2016-03-22 23:02:25 +03:00
{
Provider?.Stop(reference, tag, path, member);
2016-03-22 23:02:25 +03:00
}
}
}