28 lines
692 B
C#
28 lines
692 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BeWo.Service.Attributes
|
|
{
|
|
[AttributeUsage(AttributeTargets.Method, Inherited = true)]
|
|
public class RequireIPAddressAttribute : Attribute
|
|
{
|
|
//public List<string> AllowedIPs { get; set; }
|
|
public IPAddressList IPAddressList { get; set; }
|
|
|
|
//public RequireIPAddressAttribute(List<string> allowed_ips)
|
|
//{
|
|
// AllowedIPs = allowed_ips;
|
|
//}
|
|
|
|
//public RequireIPAddressAttribute(string allowedIP) : this(new List<string>() { allowedIP }) { }
|
|
|
|
public RequireIPAddressAttribute(IPAddressList iPAddressList)
|
|
{
|
|
IPAddressList = iPAddressList;
|
|
}
|
|
}
|
|
}
|