示例#1
0
        /// <summary>
        /// 获取 Cookie 数据
        /// </summary>
        /// <typeparam name="T">实体类型</typeparam>
        /// <param name="cookieName">Cookie 名称</param>
        /// <param name="httpRequest">HttpRequestBase,如果未指定则取自 HttpContext.Current.Request</param>
        /// <param name="propertyMatchList">属性匹配,Dictionary&lt;string, object&gt; 或 new {}</param>
        /// <param name="reflectionType">反射类型</param>
        /// <returns></returns>
        public static T GetCookieT <T>(string cookieName, HttpRequestBase httpRequest = null, object propertyMatchList = null, ReflectionTypeEnum reflectionType = ReflectionTypeEnum.Expression) where T : class, new()
        {
            Dictionary <string, object> propertyDict = CommonHelper.GetParameterDict(propertyMatchList);

            return(ExecuteGetCookie <T>(httpRequest, cookieName, propertyDict, reflectionType));
        }