You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DSWMS/开发版dev/Vue.NetCore/Vue.Net/VOL.Core/ObjectActionValidator/Filters/ObjectModelValidatorFilter.cs

18 lines
519 B
C#

using Microsoft.AspNetCore.Mvc.Filters;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
namespace VOL.Core.ObjectActionValidator
{
public class ObjectModelValidatorFilter : Attribute
{
public ObjectModelValidatorFilter(ValidatorModel validatorGroup)
{
MethodsParameters = validatorGroup.GetModelParameters()?.Select(x => x.ToLower())?.ToArray();
}
public string[] MethodsParameters { get; }
}
}