示例#1
0
        private void WriteEndTransaction(ILogger loggerController, string response)
        {
            JObject objTxnStartData = new JObject();
            JObject payload         = null;

            if (JObjectHelper.TryParseJson(response, ref payload))
            {
                payload.Remove(CommonConst.CommonField.HTTP_RESPONE_DEBUG_INFO);
                payload.Remove(CommonConst.CommonField.DATA);
                objTxnStartData[CommonConst.CommonField.PAYLOAD] = payload;
            }
            else
            {
                objTxnStartData[CommonConst.CommonField.PAYLOAD] = response;
            }
            // TODO
            // loggerController.Transaction(objTxnStartData, TransactionState.Finish);
        }
示例#2
0
        private void WriteStartTransaction(ILogger loggerController, IHttpContextProxy httpProxy, RoutingModel route)
        {
            JObject objTxnStartData = new JObject();

            objTxnStartData[CommonConst.CommonField.URL]   = httpProxy.GetURIAbsolutePath();
            objTxnStartData[CommonConst.CommonField.ROUTE] = JObject.Parse(route.GetJson());
            string  strPayload = httpProxy.GetRequestBody();;
            JObject payload    = null;

            if (JObjectHelper.TryParseJson(strPayload, ref payload))
            {
                objTxnStartData[CommonConst.CommonField.PAYLOAD] = payload;
            }
            else
            {
                objTxnStartData[CommonConst.CommonField.PAYLOAD] = strPayload;
            }
            //TODO
            // objTxnStartData[CommonConst.CommonField.USER] = httpProxy.GetRequestBody();
            // loggerController.Transaction(objTxnStartData, TransactionState.Start);
        }