diff options
author | monojenkins <jo.shields+jenkins@xamarin.com> | 2019-09-27 20:02:10 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-09-27 20:02:10 +0300 |
commit | 0da6ecef079a34c9788297ca24426f9665d9963c (patch) | |
tree | 2d84ed913a17433541c7ee1001b8867e860e2d1c | |
parent | 4e02deca04fe66935c76e1475bd9e00f4377821f (diff) |
Fix mcs build (#353)
Backport of #350.
-rw-r--r-- | src/System.Memory/src/System/Runtime/InteropServices/SequenceMarshal.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/System.Memory/src/System/Runtime/InteropServices/SequenceMarshal.cs b/src/System.Memory/src/System/Runtime/InteropServices/SequenceMarshal.cs index ded0b44d9d..1017283ff4 100644 --- a/src/System.Memory/src/System/Runtime/InteropServices/SequenceMarshal.cs +++ b/src/System.Memory/src/System/Runtime/InteropServices/SequenceMarshal.cs @@ -70,9 +70,16 @@ namespace System.Runtime.InteropServices /// <returns> /// True if successful. <paramref name="value"/> will be default if failed (due to lack of space). /// </returns> +#if __MonoCS__ + public static bool TryRead<T>(ref SequenceReader<byte> reader, out T value) + { + throw new PlatformNotSupportedException(); + } +#else public static bool TryRead<T>(ref SequenceReader<byte> reader, out T value) where T : unmanaged { return reader.TryRead<T>(out value); } +#endif } } |