Example #1
0
 /// <summary>
 /// 如果用swagger,必填httpVerbs,不然会报错
 /// </summary>
 /// <param name="groupName"></param>
 /// <param name="template">如果controller定义了模板,那么action不需要定义完整的模板,只要定义action名,调用的时候会自动把controller和action的模板进行组合</param>
 /// <param name="httpVerbs"></param>
 public ApiMethodGroupAttribute(E_ApiGroup groupName, string template = "[action]", params E_HttpVerbs[] httpVerbs)
     : base(httpVerbs.Select(s => s.ToString()), template)
 {
     GroupName = groupName.ToString();
 }
Example #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="groupName"></param>
 /// <param name="template">定义controller模板</param>
 public ApiClassGroupAttribute(E_ApiGroup groupName, string template = "apixx/[controller]")
     : base(template)
 {
     this.GroupName = groupName.ToString();
 }