Car/Assets/StompyRobot/SRF/Scripts/Service/Attributes.cs

40 lines
966 B
C#
Raw Normal View History

2025-01-02 11:32:58 +08:00
using UnityEngine.Scripting;
namespace SRF.Service
{
using System;
[AttributeUsage(AttributeTargets.Class)]
public sealed class ServiceAttribute : PreserveAttribute
{
public ServiceAttribute(Type serviceType)
{
ServiceType = serviceType;
}
public Type ServiceType { get; private set; }
}
[AttributeUsage(AttributeTargets.Method)]
public sealed class ServiceSelectorAttribute : PreserveAttribute
{
public ServiceSelectorAttribute(Type serviceType)
{
ServiceType = serviceType;
}
public Type ServiceType { get; private set; }
}
[AttributeUsage(AttributeTargets.Method)]
public sealed class ServiceConstructorAttribute : PreserveAttribute
{
public ServiceConstructorAttribute(Type serviceType)
{
ServiceType = serviceType;
}
public Type ServiceType { get; private set; }
}
}