namespace TheXamlGuy.Framework.Core { public static class IServiceFactoryExtensions { public static T? Get(this IServiceFactory serviceFactory) { return serviceFactory.Get(typeof(T)); } public static T Create(this IServiceFactory serviceFactory, params object?[] parameters) { return serviceFactory.Create(typeof(T), parameters); } public static object? Create(this IServiceFactory serviceFactory, Type type) { ServiceFactoryDescriptor? descriptor = new(serviceFactory); return descriptor.Create(type); } } }