增加Prism 框架

This commit is contained in:
chfei committed 2026-08-31 16:28:23 +08:00
1 parent 2cd6b8db86
commit 726eb6de16
99 files changed
+12527

No files matched your search

@@ -0,0 +1,81 @@
//using System;
//namespace MAX.Core.DependencyInjection;
///// <summary>
///// 依赖注册抽象(由 MAX.Core 自己定义,不依赖任何第三方 DI 容器)。
///// 具体实现由宿主项目提供,内部适配外部容器(Autofac、Microsoft.Extensions.DependencyInjection 等)。
///// </summary>
//public interface IServiceRegistrar
//{
// /// <summary>
// /// 注册单例:<typeparamref name="TImplementation"/> 实现 <typeparamref name="TService"/>
// /// </summary>
// void RegisterSingleton<TService, TImplementation>() where TService : class where TImplementation : class, TService;
// /// <summary>
// /// 注册单例实例
// /// </summary>
// void RegisterSingleton<TService>(TService instance) where TService : class;
// /// <summary>
// /// 注册单例(匿名工厂)
// /// </summary>
// void RegisterSingleton<TService>(Func<IServiceProvider, TService> factory) where TService : class;
// /// <summary>
// /// 注册单例(key):<typeparamref name="TImplementation"/> 实现 <typeparamref name="TService"/>
// /// </summary>
// void RegisterSingleton<TService, TImplementation>(object? serviceKey) where TService : class where TImplementation : class, TService;
// /// <summary>
// /// 注册单例实例(key)
// /// </summary>
// void RegisterSingleton<TService>(object? serviceKey, TService instance) where TService : class;
// /// <summary>
// /// 注册单例(key + 匿名工厂)
// /// </summary>
// void RegisterSingleton<TService>(object? serviceKey, Func<IServiceProvider, object?, TService> factory) where TService : class;
// /// <summary>
// /// 注册作用域生命周期
// /// </summary>
// void RegisterScoped<TService, TImplementation>() where TService : class where TImplementation : class, TService;
// /// <summary>
// /// 注册作用域生命周期(匿名工厂)
// /// </summary>
// void RegisterScoped<TService>(Func<IServiceProvider, TService> factory) where TService : class;
// /// <summary>
// /// 注册作用域生命周期(key):<typeparamref name="TImplementation"/> 实现 <typeparamref name="TService"/>
// /// </summary>
// void RegisterScoped<TService, TImplementation>(object? serviceKey) where TService : class where TImplementation : class, TService;
// /// <summary>
// /// 注册作用域生命周期(key + 匿名工厂)
// /// </summary>
// void RegisterScoped<TService>(object? serviceKey, Func<IServiceProvider, object?, TService> factory) where TService : class;
// /// <summary>
// /// 注册瞬时生命周期
// /// </summary>
// void RegisterTransient<TService, TImplementation>() where TService : class where TImplementation : class, TService;
// /// <summary>
// /// 注册瞬时生命周期(匿名工厂)
// /// </summary>
// void RegisterTransient<TService>(Func<IServiceProvider, TService> factory) where TService : class;
// /// <summary>
// /// 注册瞬时生命周期(key):<typeparamref name="TImplementation"/> 实现 <typeparamref name="TService"/>
// /// </summary>
// void RegisterTransient<TService, TImplementation>(object? serviceKey) where TService : class where TImplementation : class, TService;
// /// <summary>
// /// 注册瞬时生命周期(key + 匿名工厂)
// /// </summary>
// void RegisterTransient<TService>(object? serviceKey, Func<IServiceProvider, object?, TService> factory) where TService : class;
//}