improvements of the object serialization

master
この中二病に爆焔を! 5 years ago
parent caa8aaea92
commit d0e95c71da

@ -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

@ -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

Loading…
Cancel
Save