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 을 전달합니다.

적용 대상