예제 #1
0
        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)));
        }
예제 #2
0
        public override IJsonDataObject MaterializeBix(BixReader reader)
        {
            var json = reader.ReadString();

            if (json == null)
            {
                return(null);
            }
            return(JsonReader.DeserializeDataObject(json, true));
        }
예제 #3
0
        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);
        }
예제 #4
0
 public override string MaterializeBix(BixReader reader) => reader.ReadString();