ReadOnlySpanMarshaller<T,TUnmanagedElement> クラス

定義

重要

この API は CLS 準拠ではありません。

マネージド値から 要素のアンマネージド値の連続したネイティブ配列への マーシャリング ReadOnlySpan<T> をサポートします。

generic <typename T, typename TUnmanagedElement>
 where TUnmanagedElement : value classpublic ref class ReadOnlySpanMarshaller abstract sealed
[System.CLSCompliant(false)]
[System.Runtime.InteropServices.Marshalling.ContiguousCollectionMarshaller]
[System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(System.ReadOnlySpan<>), System.Runtime.InteropServices.Marshalling.MarshalMode.ManagedToUnmanagedIn, typeof(System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<,>+ManagedToUnmanagedIn))]
[System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(System.ReadOnlySpan<>), System.Runtime.InteropServices.Marshalling.MarshalMode.UnmanagedToManagedOut, typeof(System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<,>+UnmanagedToManagedOut))]
public static class ReadOnlySpanMarshaller<T,TUnmanagedElement> where TUnmanagedElement : struct
[<System.CLSCompliant(false)>]
[<System.Runtime.InteropServices.Marshalling.ContiguousCollectionMarshaller>]
[<System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(System.ReadOnlySpan<>), System.Runtime.InteropServices.Marshalling.MarshalMode.ManagedToUnmanagedIn, typeof(System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<,>+ManagedToUnmanagedIn))>]
[<System.Runtime.InteropServices.Marshalling.CustomMarshaller(typeof(System.ReadOnlySpan<>), System.Runtime.InteropServices.Marshalling.MarshalMode.UnmanagedToManagedOut, typeof(System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<,>+UnmanagedToManagedOut))>]
type ReadOnlySpanMarshaller<'T, 'UnmanagedElement (requires 'UnmanagedElement : struct)> = class
Public Class ReadOnlySpanMarshaller(Of T, TUnmanagedElement)

型パラメーター

T

スパンのマネージド要素の型。

TUnmanagedElement

スパンの要素のアンマネージド型。

継承
ReadOnlySpanMarshaller<T,TUnmanagedElement>
属性

注釈

ReadOnlySpan<T>このマーシャラーでマーシャリングされた は、 のセマンティクスとGetReference<T>(ReadOnlySpan<T>)一致します。 特に、スパンが非null 値で構築された場合、このマーシャラーは長さ 0 のスパンに非null 値を渡します。

適用対象