Beispiel #1
0
        private static EventParameter ReadSystemBinaryParameter(BinaryReader reader, string name)
        {
            BinaryReadAdaptor adaptor   = new BinaryReadAdaptor(reader);
            string            className = adaptor.ReadString();

            return(new EventParameter(name, className, adaptor.ReadBytes(), ValueFormat.SystemBinary));
        }
Beispiel #2
0
        void IBinarySerializable.Read(BinaryReader reader)
        {
            m_entries = new List <InstrumentationEntry>();
            BinaryReadAdaptor adaptor = new BinaryReadAdaptor(reader);

            Read(adaptor, m_entries);
        }
Beispiel #3
0
        public void Read(BinaryReader reader)
        {
            var adaptor = new BinaryReadAdaptor(reader);

            _encodingName = adaptor.ReadString();
            _length       = adaptor.ReadInt32();
            _type         = adaptor.ReadString();
        }
Beispiel #4
0
        public void Read(BinaryReader reader)
        {
            var adaptor = new BinaryReadAdaptor(reader);

            _domain   = adaptor.ReadStringNullable();
            _expires  = adaptor.ReadDateTime().ToSystemDateTime();
            _httpOnly = adaptor.ReadBoolean();
            _name     = adaptor.ReadStringNullable();
            _path     = adaptor.ReadStringNullable();
            _secure   = adaptor.ReadBoolean();
            _value    = adaptor.ReadStringNullable();
        }
Beispiel #5
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);
            }
        }
Beispiel #6
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();
            }
        }
Beispiel #7
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);
            }
        }
Beispiel #8
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);
            }
        }
Beispiel #9
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());
                    }
                }
            }
        }
Beispiel #10
0
        protected override void ReadContents(BinaryReader reader)
        {
            // Pass to base first.

            base.ReadContents(reader);

            // Read all properties.

            BinaryReadAdaptor adaptor = new BinaryReadAdaptor(reader);

            foreach (PropertyInfo propertyInfo in PropertyInfos)
            {
                bool isNull = adaptor.ReadBoolean();
                if (isNull)
                {
                    m_properties[propertyInfo.Name] = null;
                }
                else
                {
                    m_properties[propertyInfo.Name] = adaptor.ReadType(propertyInfo.Type);
                }
            }
        }
Beispiel #11
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));
            }
        }
Beispiel #12
0
        private static EventParameter ReadPrimitiveTypeParameter(BinaryReader reader, string name)
        {
            BinaryReadAdaptor adaptor = new BinaryReadAdaptor(reader);

            return(new EventParameter(name, adaptor.ReadObject()));
        }