Files
shgxtzcjhoudaosaomadayinwpf/RIZO_Application/RIZO_Application.Infrastructure/CustomAttribute/AppServiceAttribute.cs

21 lines
515 B
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace RIZO_Application.Infrastructure.CustomAttribute
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class AppServiceAttribute : Attribute
{
public Type ServiceType { get; set; }
public ServiceLifetime Lifetime { get; set; } = ServiceLifetime.Transient;
}
public enum ServiceLifetime
{
Transient,
Singleton,
Scoped
}
}