//TODO: TimeZone public object Read(ProtoReader reader) { long ticks = 0; int offset = 0; byte[] buffer = reader.ReadByteArray(); ticks |= (long)buffer[offset++]; ticks |= (long)buffer[offset++] << 8; ticks |= (long)buffer[offset++] << 16; ticks |= (long)buffer[offset++] << 24; ticks |= (long)buffer[offset++] << 32; ticks |= (long)buffer[offset++] << 40; ticks |= (long)buffer[offset++] << 48; ticks |= (long)buffer[offset++] << 56; DateTimeKind kind = (DateTimeKind)buffer[offset++]; if (kind == DateTimeKind.Local) { return new DateTime(ticks, DateTimeKind.Utc).ToLocalTime(); } return new DateTime(ticks, kind); }
public object Read(ProtoReader reader) { int[] bits = new int[4]; byte[] buffer = reader.ReadByteArray(); Buffer.BlockCopy(buffer, 0, bits, 0, buffer.Length); return new Decimal(bits); }
public object Read(ProtoReader reader) { return reader.ReadByteArray(); }
public object Read(ProtoReader reader) { return new Guid(reader.ReadByteArray()); }