public void AutoTamperResponseBefore(Session oSession)
        {
            DelayedResponsesInformation delayData = null;

            //
            // when fiddler initialized
            // sometimes an exception is thrown
            //
            try
            {
                delayData = fiddlerHook.GetDelayFor(
                    oSession.url,
                    oSession.GetResponseBodyAsString()
                    );
            }
            catch (Exception) { }

            if (delayData != null)
            {
                try
                {
                    Thread.Sleep(delayData.DelaySec * 1000);
                }
                catch (Exception) { }
            }
        }
        private DelayedResponsesInformation[] LoadPersistedData()
        {
            DelayedResponsesInformation[] readedData = new DelayedResponsesInformation[] { };

            try
            {
                using (FileStream fs = File.Open(persistenceXmlConfigFilePath, FileMode.Open))
                {
                    XmlSerializer xmlSer = new XmlSerializer(typeof(DelayedResponsesInformation[]));

                    readedData = (DelayedResponsesInformation[])xmlSer.Deserialize(fs);

                    fs.Close();
                }
            }
            catch (Exception) { }

            return(readedData);
        }
        private DelayedResponsesInformation[] LoadPersistedData()
        {
            DelayedResponsesInformation[] readedData = new DelayedResponsesInformation[] { };

            try
            {
                using (FileStream fs = File.Open(persistenceXmlConfigFilePath, FileMode.Open))
                {
                    XmlSerializer xmlSer = new XmlSerializer(typeof(DelayedResponsesInformation[]));

                    readedData = (DelayedResponsesInformation[])xmlSer.Deserialize(fs);

                    fs.Close();
                }
            }
            catch (Exception) { }

            return readedData;
        }