Blame view

netcore/src/Infrastructure/NCC/DynamicApiController/Attributes/RouteConstraintAttribute.cs 625 Bytes
de2bd2f9   “wangming”   项目初始化
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  using NCC.Dependency;
  using System;
  
  namespace Microsoft.AspNetCore.Mvc
  {
      /// <summary>
      /// 接口参数约束
      /// </summary>
      [SuppressSniffer, AttributeUsage(AttributeTargets.Parameter)]
      public class RouteConstraintAttribute : Attribute
      {
          /// <summary>
          /// 构造函数
          /// </summary>
          /// <param name="constraint"></param>
          public RouteConstraintAttribute(string constraint)
          {
              Constraint = constraint;
          }
  
          /// <summary>
          /// 参数位置
          /// </summary>
          public string Constraint { get; set; }
      }
  }