mirror of
https://github.com/cq-panda/Vue.NetCore.git
synced 2026-10-19 06:58:16 +08:00
19 lines
508 B
C#
19 lines
508 B
C#
using VOL.Core.Extensions;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace VOL.Core.Extensions
|
|
{
|
|
public static class ServiceProviderManagerExtension
|
|
{
|
|
public static object GetService(this Type serviceType)
|
|
{
|
|
// HttpContext.Current.RequestServices.GetRequiredService<T>(serviceType);
|
|
return Utilities.HttpContext.Current.RequestServices.GetService(serviceType);
|
|
}
|
|
|
|
}
|
|
}
|