添加项目文件。
This commit is contained in:
1 parent
6a017c9547
commit
58abbb5b4f
86 files changed
+8729
No files matched your search
@@ -0,0 +1,37 @@
|
||||
//using MAX.Core.Autofac;
|
||||
//using MAX.Core.Infrastructure;
|
||||
//using System;
|
||||
//using System.Collections.Concurrent;
|
||||
|
||||
//namespace MAX.Core.DependencyInjection;
|
||||
|
||||
//public interface ILazyServiceProvider
|
||||
//{
|
||||
// object LazyGetService(Type serviceType);
|
||||
// T LazyGetService<T>();
|
||||
//}
|
||||
|
||||
//public class LazyServiceProvider : SingleInstance<LazyServiceProvider>, ILazyServiceProvider
|
||||
//{
|
||||
// protected ConcurrentDictionary<Type, Lazy<object>> CachedServices { get; }
|
||||
// private LazyServiceProvider()
|
||||
// {
|
||||
// CachedServices = new ConcurrentDictionary<Type, Lazy<object>>();
|
||||
// }
|
||||
// public virtual T LazyGetService<T>()
|
||||
// {
|
||||
// return (T)LazyGetService(typeof(T));
|
||||
// }
|
||||
|
||||
// public virtual object LazyGetService(Type serviceType)
|
||||
// {
|
||||
// return GetService(serviceType);
|
||||
// }
|
||||
// public virtual object GetService(Type serviceType)
|
||||
// {
|
||||
// return CachedServices.GetOrAdd(
|
||||
// serviceType,
|
||||
// _ => new Lazy<object>(() => IocManager.Resolve(serviceType))
|
||||
// ).Value;
|
||||
// }
|
||||
//}
|
||||
Reference in new issue
Block a user