Ejemplo n.º 1
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);
        }