Beispiel #1
0
        private static void OnMemberDeserialized(object sender, MemberSerializedEventArgs e)
        {
            Console.CursorLeft = e.Context.Depth * 4;
            var value = e.Value ?? "null";

            Console.WriteLine("D-End: {0} ({1}) @ {2}", e.MemberName, value, e.Offset);
        }
        private static void OnMemberSerialized(object sender, MemberSerializedEventArgs e)
        {
            PrintIndent(e.Context.Depth);
            var value = e.Value ?? "null";

            Debug.WriteLine("S-End: {0} ({1}) @ {2}", e.MemberName, value, e.Offset);
        }
Beispiel #3
0
        private static void XbeeOnFrameMemberSerialized(object sender, MemberSerializedEventArgs e)
        {
            Console.CursorLeft = e.Context.Depth * 4;
            var value = e.Value ?? "null";

            Console.WriteLine("S-End: {0} ({1})", e.MemberName, value);
        }
        private static void OnMemberDeserialized(object sender, MemberSerializedEventArgs e)
        {
            PrintIndent(e.Context.Depth);
            var value = e.Value ?? "null";

            if (value is byte[])
            {
                value = BitConverter.ToString((byte[])value);
            }

            Debug.WriteLine("D-End: {0} ({1}) @ {2}", e.MemberName, value, e.Offset);
        }
        private void SerializerMemberDeserialized(object sender, MemberSerializedEventArgs e)
        {
            if (e.MemberName == "IsLittleEndian")
            {
                var isLittleEndian = bool.Parse((string)e.Value);
                if (!isLittleEndian)
                {
                    _serializer.Endianness = BinaryDataSerialization.Endianness.Big;
                }
            }

            Debug.WriteLine("read {0}: {1} @ {2}", e.MemberName, e.Value, e.Offset);
        }
Beispiel #6
0
        private void SerializerMemberDeserialized(object sender, MemberSerializedEventArgs e)
        {
            if (e.MemberName == "IsLittleEndian")
            {
                bool isLittleEndian = bool.Parse((string)e.Value);
                if (!isLittleEndian)
                {
                    _serializer.Endianness = BinarySerialization.Endianness.Big;
                }
            }

            //Console.WriteLine("read {0}: {1}", e.MemberName, e.Value);
        }
Beispiel #7
0
 private void OnMemberDeserialized(object sender, MemberSerializedEventArgs e)
 {
     FrameMemberDeserialized?.Invoke(sender, e);
 }
Beispiel #8
0
        private void OnMemberDeserialized(object sender, MemberSerializedEventArgs e)
        {
            EventHandler <MemberSerializedEventArgs> handler = MemberDeserialized;

            handler?.Invoke(sender, e);
        }
Beispiel #9
0
        private static void OnMemberDeserialized(object sender, MemberSerializedEventArgs e)
        {
            var value = e.Value ?? "null";

            Debug.WriteLine("D-End: {0} ({1}) @ {2}", e.MemberName, value, e.Offset);
        }