示例#1
0
        private void App_BeginRequest(object sender, EventArgs e)
        {
            HttpApplication app = (HttpApplication)sender;

            // 记录HTTP请求的所有数据
            HttpRequestData data = new HttpRequestData();

            data.FillBaseInfo();
            data.HttpInfo = HttpInfo.Create(app.Context);

            ClownFish.Log.LogHelper.Write(data);
        }
示例#2
0
        public void Test_HttpInfo_Create_Argument_null()
        {
            var result = HttpInfo.Create(null);

            Assert.IsNull(result);


            MethodInfo method = typeof(HttpInfo).GetMethod("SetHttpInfo", BindingFlags.Instance | BindingFlags.NonPublic);

            HttpInfo info = new HttpInfo();

            method.Invoke(info, new object[] { null });                         // 没异常就算是通过,不需要断言
        }