public override DateTimeBookmark MaterializeBix(BixReader reader) { var v = reader.ReadDateTime(); var pid = reader.ReadLong(); var adr = reader.ReadInt(); return(new DateTimeBookmark(v, new Bookmark(pid, adr))); }
public override Message MaterializeBix(BixReader reader) { Message result = null; if (reader.ReadBool())//if non-null message { result = new Message(); var ngdid = reader.ReadNullableGDID(); result.Gdid = ngdid.HasValue ? ngdid.Value : GDID.ZERO; result.Guid = reader.ReadGuid(); var nrel = reader.ReadNullableGuid(); result.RelatedTo = nrel.HasValue ? nrel.Value : Guid.Empty; result.Channel = reader.ReadAtom(); result.App = reader.ReadAtom(); result.Type = (MessageType)reader.ReadInt(); result.Source = reader.ReadInt(); result.UTCTimeStamp = reader.ReadDateTime(); result.Host = reader.ReadString(); result.From = reader.ReadString(); result.Topic = reader.ReadString(); result.Text = reader.ReadString(); result.Parameters = reader.ReadString(); result.ArchiveDimensions = reader.ReadString(); var edata = reader.ReadString(); if (edata != null) { //this could be serialized using bix for better performance result.ExceptionData = JsonReader.ToDoc <WrappedExceptionData>(edata); } } return(result); }