public override StringBookmark MaterializeBix(BixReader reader) { var v = reader.ReadString(); var pid = reader.ReadLong(); var adr = reader.ReadInt(); return(new StringBookmark(v, new Bookmark(pid, adr))); }
public override IJsonDataObject MaterializeBix(BixReader reader) { var json = reader.ReadString(); if (json == null) { return(null); } return(JsonReader.DeserializeDataObject(json, true)); }
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); }
public override string MaterializeBix(BixReader reader) => reader.ReadString();