1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| using Microsoft.Extensions.DependencyInjection;
| using System;
|
| namespace WIDESEA_Core.Extensions
| {
| public static class ServiceProviderManagerExtension
| {
| public static object GetService(this Type serviceType)
| {
| // HttpContext.Current.RequestServices.GetRequiredService<T>(serviceType);
| return Utilities.HttpContext.Current.RequestServices.GetRequiredService(serviceType);
| }
|
| }
| }
|
|