摘要: 常用的过滤器有三种:OnAuthorization、ActionFilterAttribute、ExceptionFilterAttribute 本文件主要记录使用ExceptionFilterAttribute记录接口的异常日志,包括请求参数、响应结果,耗时等 直接上代码: 1 using New 阅读全文
posted @ 2021-07-08 15:59 繒經最羙 阅读(333) 评论(0) 推荐(1) 编辑
摘要: 常用的过滤器有三种:OnAuthorization、ActionFilterAttribute、ExceptionFilterAttribute 本文件主要记录使用ActionFilterAttribute记录接口的访问日志,包括请求参数、响应结果,耗时等 直接上代码: 1 using Newton 阅读全文
posted @ 2021-07-08 15:56 繒經最羙 阅读(750) 评论(0) 推荐(0) 编辑
摘要: 使用js+Ajax请求API接口数据-带请求头方式直接上代码前台调用:后台部分: /// /// 后台再请求别的接口的方法,体现了添加request header /// /// public string Login(string RequestString, HttpContext context) { string url = http... 阅读全文
posted @ 2017-06-07 11:41 繒經最羙 阅读(14906) 评论(0) 推荐(1) 编辑
摘要: C# http请求带请求头部分先上代码: 阅读全文
posted @ 2017-06-07 11:25 繒經最羙 阅读(3245) 评论(1) 推荐(0) 编辑
摘要: 循环执行逻辑 阅读全文
posted @ 2016-11-30 15:07 繒經最羙 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 1 #-*- coding: UTF-8 -*- 2.7版本对中文的要求 2 import uuid 3 import socket 4 5 6 def get_mac_address(): 7 mac=uuid.UUID(int = uuid.getnode()).hex[-12:] 8 return ":".join([mac[e:e+2] fo... 阅读全文
posted @ 2016-11-30 15:01 繒經最羙 阅读(2046) 评论(0) 推荐(0) 编辑
摘要: where T : struct where T : class where T : IFoo where T : Foo where T : new() 这是一个构造函数约束,指定类型 T 必须有一个默认构造函数 where T1 : T2 阅读全文
posted @ 2016-09-19 17:41 繒經最羙 阅读(509) 评论(0) 推荐(0) 编辑
摘要: public class Program { static void Main(string[] args) { MyButton btn = new MyButton(); //注册事件,把btn_OnClick方法压入事件队列, //可以+=多个,这里简单点就压入一个吧。 ... 阅读全文
posted @ 2016-09-19 17:35 繒經最羙 阅读(134) 评论(0) 推荐(0) 编辑
摘要: public class Program { public delegate void Test(int i, int j); static void Main(string[] args) { //第一种 Test t = new Test(Add); t(132... 阅读全文
posted @ 2016-09-19 17:25 繒經最羙 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 系统﹕显示图书馆的所有书籍类别用户﹕浏览并选择一个书籍类别系统﹕显示这个书籍类别的所有书籍用户﹕浏览并选择一本书籍系统﹕显示书籍的详细信息用户﹕借阅书籍系统﹕办理预借手续用例后果﹕产生一份预借记录。并将预借记录与书籍关联。 阅读全文
posted @ 2016-09-19 17:04 繒經最羙 阅读(158) 评论(0) 推荐(0) 编辑