Пример #1
0
 public virtual void TestSchemaEncodeDecodeFidelity()
 {
     var schema = TimeSchema.Of();
     var time = TimeSpan.FromMilliseconds(DateTimeHelper.CurrentUnixTimeMillis());
     var encoded = schema.Encode(time);
     var decoded = schema.Decode(encoded);
     Assert.Equal(time, decoded);
 }
Пример #2
0
 static Schema()
 {
     ByteSequence = new ByteSequenceSchema();
     ByteArray    = new ByteArraySchema();
     String       = StringSchema.UTF8;
     Boolean      = new BooleanSchema();
     Int8         = new ByteSchema();
     Int16        = new ShortSchema();
     Int32        = new IntegerSchema();
     Int64        = new LongSchema();
     Float        = new FloatSchema();
     TimeStamp    = TimestampSchema.Timestamp;
     Date         = TimestampSchema.Date;
     Time         = new TimeSchema();
 }