27 lines
500 B
C#
27 lines
500 B
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace YY.Admin.Core
|
|||
|
|
{
|
|||
|
|
public enum Lifecycle
|
|||
|
|
{
|
|||
|
|
Singleton,
|
|||
|
|
Transient,
|
|||
|
|
Scoped
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
[AttributeUsage(AttributeTargets.Class)]
|
|||
|
|
public class LifecycleAttribute : Attribute
|
|||
|
|
{
|
|||
|
|
public Lifecycle Lifecycle { get; }
|
|||
|
|
|
|||
|
|
public LifecycleAttribute(Lifecycle lifecycle)
|
|||
|
|
{
|
|||
|
|
Lifecycle = lifecycle;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|