コード例 #1
0
 public override Object read(POxOPrimitiveDecoder decoder)
 {
     try
     {
         if (canBeNull)
         {
             byte isNull = (byte)decoder.ReadByte();
             if (isNull == 0x00)
             {
                 return null;
             }
         }
         return decoder.readLong(true);
     }
     catch (ObjectDisposedException e)
     {
         throw new POxOSerializerException("Error during Long deserializing.", e);
     }
 }
コード例 #2
0
 public override Object read(POxOPrimitiveDecoder decoder)
 {
     try
     {
         if (canBeNull)
         {
             byte isNull = (byte)decoder.ReadByte();
             if (isNull == 0x00)
             {
                 return null;
             }
         }
         DateTime value = DateTime.FromFileTime(decoder.readLong(true));
         return value;
     }
     catch (ObjectDisposedException e)
     {
         throw new POxOSerializerException("Error during Date deserializing.", e);
     }
     catch (NotSupportedException e)
     {
         throw new POxOSerializerException("Error during Date deserializing.", e);
     }
 }