Example #1
0
        public override object Read(IReadContext context)
        {
            var value = ((context.ReadByte() & unchecked (0xff)) << 8) + (context.ReadByte
                                                                              () & unchecked (0xff));

            return((short)value);
        }
Example #2
0
 public override object Read(IReadContext context)
 {
     var b1 = context.ReadByte();
     var b2 = context.ReadByte();
     var charValue = (char) ((b1 & unchecked(0xff)) | ((b2 & unchecked(0xff)) << 8));
     return charValue;
 }
Example #3
0
        public override object Read(IReadContext context)
        {
            var b1        = context.ReadByte();
            var b2        = context.ReadByte();
            var charValue = (char)((b1 & unchecked (0xff)) | ((b2 & unchecked (0xff)) << 8));

            return(charValue);
        }
Example #4
0
		public override object Read(IReadContext context)
		{
			byte ret = context.ReadByte();
			if (ret == True)
			{
				return true;
			}
			if (ret == False)
			{
				return false;
			}
			return null;
		}
Example #5
0
        public override object Read(IReadContext context)
        {
            byte ret = context.ReadByte();

            if (ret == True)
            {
                return(true);
            }
            if (ret == False)
            {
                return(false);
            }
            return(null);
        }
Example #6
0
 public override object Read(IReadContext context)
 {
     var value = ((context.ReadByte() & unchecked(0xff)) << 8) + (context.ReadByte
         () & unchecked(0xff));
     return (short) value;
 }
Example #7
0
 public override object Read(IReadContext context)
 {
     return (sbyte)(context.ReadByte() - 128);
 }
Example #8
0
 public override object Read(IReadContext context)
 {
     var byteValue = context.ReadByte();
     return byteValue;
 }
Example #9
0
 public override object Read(IReadContext context)
 {
     return((sbyte)(context.ReadByte() - 128));
 }
Example #10
0
        public override object Read(IReadContext context)
        {
            var byteValue = context.ReadByte();

            return(byteValue);
        }