You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
351 B

using System;
using Avalonia.Markup.Xaml;
namespace Avalonia.Skia.Lottie;
internal static class ServiceProviderExtensions
{
public static T GetService<T>(this IServiceProvider sp)
{
return (T)(sp?.GetService(typeof(T)));
}
public static Uri GetContextBaseUri(this IServiceProvider ctx)
{
return ctx.GetService<IUriContext>().BaseUri;
}
}