diff --git a/Parallel/IpcParallel/Stream/ObjectStream.vb b/Parallel/IpcParallel/Stream/ObjectStream.vb index f766e42..6d9dac2 100644 --- a/Parallel/IpcParallel/Stream/ObjectStream.vb +++ b/Parallel/IpcParallel/Stream/ObjectStream.vb @@ -19,7 +19,7 @@ Namespace IpcStream Public ReadOnly Property isPrimitive As Boolean Get - Return DataFramework.IsPrimitive(type.GetType(knownFirst:=True)) + Return DataFramework.IsPrimitive(GetUnderlyingType) End Get End Property @@ -46,6 +46,10 @@ Namespace IpcStream End Using End Sub + Public Function GetUnderlyingType() As Type + Return type.GetType(knownFirst:=True) + End Function + Public Function openMemoryBuffer() As MemoryStream Return New MemoryStream(stream) End Function diff --git a/Parallel/IpcParallel/Stream/StreamEmit.vb b/Parallel/IpcParallel/Stream/StreamEmit.vb index 1299403..35dab4e 100644 --- a/Parallel/IpcParallel/Stream/StreamEmit.vb +++ b/Parallel/IpcParallel/Stream/StreamEmit.vb @@ -29,6 +29,12 @@ Namespace IpcStream Return Me End Function + Public Function handleCreate(stream As ObjectStream) As Object + Using buf As Stream = stream.openMemoryBuffer + Return handleCreate(buf, stream.GetUnderlyingType, stream.method) + End Using + End Function + Public Function handleCreate(buf As Stream, type As Type, emit As StreamMethods) As Object If emit = StreamMethods.Auto Then If loadBuffers.ContainsKey(type) Then