1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| using Microsoft.Extensions.DependencyInjection;
|
| namespace KH.WMS.Core.DependencyInjection.ServiceLifetimes;
|
| /// <summary>
| /// 自注册服务标记 - 服务自身作为实现类型
| /// </summary>
| [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
| public class SelfRegisteredServiceAttribute : Attribute
| {
| /// <summary>
| /// 服务生命周期
| /// </summary>
| public ServiceLifetime Lifetime { get; set; } = ServiceLifetime.Scoped;
| }
|
|