disable string decode of the meta chars in bson decode

master
guigang xie 4 years ago
parent 384e9386ed
commit 9bd13e33e3

@ -92,7 +92,7 @@ Namespace IpcStream
Public Shared Function GetSocket(stream As ObjectStream) As SocketRef
Using file As Stream = stream.openMemoryBuffer
Return BSONFormat.Load(file).CreateObject(GetType(SocketRef))
Return BSONFormat.Load(file).CreateObject(GetType(SocketRef), decodeMetachar:=False)
End Using
End Function

@ -95,11 +95,11 @@ Namespace IpcStream
emitCache.Add(type, handler)
Return emitCache(type).ReadBuffer(buf)
Else
Return BSONFormat.Load(buf).CreateObject(type)
Return BSONFormat.Load(buf).CreateObject(type, decodeMetachar:=False)
End If
End If
ElseIf emit = StreamMethods.BSON Then
Return BSONFormat.Load(buf).CreateObject(type)
Return BSONFormat.Load(buf).CreateObject(type, decodeMetachar:=False)
ElseIf loadBuffers.ContainsKey(type) Then
Return loadBuffers(type)(buf)
Else

@ -67,7 +67,7 @@ Public Class MapObject : Implements IDisposable
Dim memory As MemoryMappedFile = MemoryMappedFile.OpenExisting(hMem)
Dim view As MemoryMappedViewStream = memory.CreateViewStream
obj = BSONFormat.Load(view).CreateObject(type)
obj = BSONFormat.Load(view).CreateObject(type, decodeMetachar:=False)
Return obj
End Function

Loading…
Cancel
Save