123456789101112131415161718192021222324252627282930313233 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Text;
- namespace NXWMS.Model.Common
- {
- [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
- public class AutoInjectAttribute : Attribute
- {
- public AutoInjectAttribute(Type interfaceType, InjectType injectType)
- {
- Type = interfaceType;
- InjectType = injectType;
- }
- public Type Type { get; set; }
- /// <summary>
- /// 注入类型
- /// </summary>
- public InjectType InjectType { get; set; }
- }
- /// <summary>
- /// 依赖注入类型
- /// </summary>
- public enum InjectType
- {
- Scope,
- Single,
- Transient
- }
- }
|