Updated to support .NET Standard 2.0 via multi-targeting. This brings the following changes (most of which are conditionally-compiled):
Added references to System.Memory and IndexRange (only for netstandard2.0).
UnmanagedType.LPUTF8Str is referenced as (UnmanagedType)48.
Marshal.PtrToStringUTF8 and various other methods are reimplemented using various workarounds, found in the Extensions class.
Detection of tuple types checks for types starting with System.ValueTuple` instead of implementing ITuple (which is perhaps even better, since System.Tuple also implements ITuple but cannot be used this way).
Static methods in IReturnTypeFactory moved to new non-interface ReturnTypeFactory.
Unconditional workarounds for GetSubArray (should be faster anyway).
Updated to support .NET Standard 2.0 via multi-targeting. This brings the following changes (most of which are conditionally-compiled):
System.Memory
andIndexRange
(only fornetstandard2.0
).UnmanagedType.LPUTF8Str
is referenced as(UnmanagedType)48
.Marshal.PtrToStringUTF8
and various other methods are reimplemented using various workarounds, found in theExtensions
class.System.ValueTuple`
instead of implementingITuple
(which is perhaps even better, sinceSystem.Tuple
also implementsITuple
but cannot be used this way).IReturnTypeFactory
moved to new non-interfaceReturnTypeFactory
.GetSubArray
(should be faster anyway).