Exemple #1
0
        public void Read(BinaryReader reader)
        {
            var adaptor = new BinaryReadAdaptor(reader);

            _encodingName = adaptor.ReadString();
            _length       = adaptor.ReadInt32();
            _type         = adaptor.ReadString();
        }
Exemple #2
0
        public void Read(BinaryReader reader)
        {
            _cookies.Clear();
            var adaptor = new BinaryReadAdaptor(reader);
            var count   = adaptor.ReadInt32();

            for (var index = 0; index < count; index++)
            {
                var cookie = new HttpCookieDetail();
                cookie.Read(reader);
                _cookies.Add(cookie);
            }
        }
Exemple #3
0
        public void Read(BinaryReader reader)
        {
            var adaptor = new BinaryReadAdaptor(reader);

            _key = adaptor.ReadStringNullable();
            var count = adaptor.ReadInt32();

            _values = new string[count];
            for (var index = 0; index < count; ++index)
            {
                _values[index] = adaptor.ReadStringNullable();
            }
        }
Exemple #4
0
        public void Read(BinaryReader reader)
        {
            _variables.Clear();
            var adaptor = new BinaryReadAdaptor(reader);
            var count   = adaptor.ReadInt32();

            for (var index = 0; index < count; index++)
            {
                var variable = new HttpFormVariableDetail();
                variable.Read(reader);
                _variables.Add(variable);
            }
        }
Exemple #5
0
        public void Read(BinaryReader reader)
        {
            m_headers.Clear();
            BinaryReadAdaptor adaptor = new BinaryReadAdaptor(reader);
            int count = adaptor.ReadInt32();

            for (int index = 0; index < count; index++)
            {
                string key        = adaptor.ReadString();
                int    valueCount = adaptor.ReadInt32();
                if (valueCount == 0)
                {
                    m_headers.Add(key, null);
                }
                else
                {
                    for (int valueIndex = 0; valueIndex < valueCount; ++valueIndex)
                    {
                        m_headers.Add(key, adaptor.ReadString());
                    }
                }
            }
        }
Exemple #6
0
        private void ReadStandard(BinaryReader reader)
        {
            var adaptor = new BinaryReadAdaptor(reader);

            _event    = adaptor.ReadString();
            _source   = adaptor.ReadString();
            _type     = adaptor.ReadString();
            _method   = adaptor.ReadString();
            _message  = adaptor.ReadString();
            _time     = new System.DateTime(adaptor.ReadInt64());
            _sequence = adaptor.ReadInt32();

            if (adaptor.ReadBoolean())
            {
                _exception = ExceptionInfo.FromBinary(reader);
            }
        }
Exemple #7
0
        private void Read(BinaryReadAdaptor adaptor, List <InstrumentationEntry> entries)
        {
            int count = adaptor.ReadInt32();

            for (int index = 0; index < count; ++index)
            {
                string key   = null;
                object value = null;

                // Key.

                if (!adaptor.ReadBoolean())
                {
                    key = adaptor.ReadString();
                }

                // Value.

                if (!adaptor.ReadBoolean())
                {
                    if (adaptor.ReadBoolean())
                    {
                        // Details.

                        InstrumentationDetails details = new InstrumentationDetails();
                        Read(adaptor, details.m_entries);
                        value = details;
                    }
                    else
                    {
                        value = adaptor.ReadObject();
                    }
                }

                entries.Add(new InstrumentationEntry(key, value));
            }
        }