Example #1
0
        /// <summary>
        ///     请上下文获取验证数据。
        /// </summary>
        /// <returns></returns>
        public static EntrySign ParseFromContext()
        {
            var ret = new EntrySign();

            ParseMetadata(ret);
            return(ret);
        }
Example #2
0
        private static void ParseMetadata(EntrySign es)
        {
            if (es == null)
                return;

            var ps = es.GetType().GetProperties();
            foreach (var p in ps)
            {
                var context = HttpContext.Current;
                if (context == null)
                    return;
                p.SetValue(es, context.Request[p.Name], null);
            }
        }
Example #3
0
        private static void ParseMetadata(EntrySign es)
        {
            if (es == null)
            {
                return;
            }

            var ps = es.GetType().GetProperties();

            foreach (var p in ps)
            {
                var context = HttpContext.Current;
                if (context == null)
                {
                    return;
                }
                p.SetValue(es, context.Request[p.Name], null);
            }
        }
Example #4
0
 /// <summary>
 ///     请上下文获取验证数据。
 /// </summary>
 /// <returns></returns>
 public static EntrySign ParseFromContext()
 {
     var ret = new EntrySign();
     ParseMetadata(ret);
     return ret;
 }