摘要: /// /// 反向比较器。 /// /// 类型参数 public class ReverseComparer : IComparer { #region Fields private readonly IComparer original; #endregion #region P... 阅读全文
posted @ 2016-03-27 17:39 至简 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 1 /// 2 /// 序列号产生器(用闭包实现)。 3 /// 4 /// 5 public static Func SerialMaker(string prefix, int sequence) 6 { 7 Func maker = de... 阅读全文
posted @ 2016-03-27 17:31 至简 阅读(2296) 评论(0) 推荐(0) 编辑
摘要: 采用ASP.NET Web API 提供的IAuthenticationFilter和IAuthorizationFilter接口分别实现验证和授权。其中用到IIdentity和IPrincipal接口。 IIdentity的具体类型用来标识通过验证的用户身份,由用户凭据(Credential)来创 阅读全文
posted @ 2016-03-27 14:26 至简 阅读(7397) 评论(0) 推荐(0) 编辑