SpanMarshaller<T,TUnmanagedElement> 클래스

정의

Important

이 API는 CLS 규격이 아닙니다.

관리되는 값에서 요소의 관리되지 않는 값의 연속 네이티브 배열로 마샬링을 Span<T> 지원합니다.

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

형식 매개 변수

T

범위의 관리되는 요소 형식입니다.

TUnmanagedElement

범위의 요소에 대한 관리되지 않는 형식입니다.

상속
SpanMarshaller<T,TUnmanagedElement>
특성

설명

Span<T> 이 마샬러로 마샬링된 경우의 의미 체계와 일치합니다GetReference<T>(Span<T>). 특히 이 마샬러는 범위가 비값null 으로 생성된 경우 길이가 0인 범위에 대해 비값null 을 전달합니다.

메서드

Name Description
AllocateContainerForManagedElements(TUnmanagedElement*, Int32)

관리되는 요소를 저장할 공간을 할당합니다.

AllocateContainerForUnmanagedElements(Span<T>, Int32)

관리되지 않는 요소를 저장할 공간을 할당합니다.

Free(TUnmanagedElement*)

할당된 관리되지 않는 메모리를 해제합니다.

GetManagedValuesDestination(Span<T>)

관리되는 컬렉션 요소를 저장해야 하는 공간의 범위를 가져옵니다.

GetManagedValuesSource(Span<T>)

관리되는 컬렉션 요소의 범위를 가져옵니다.

GetUnmanagedValuesDestination(TUnmanagedElement*, Int32)

관리되지 않는 컬렉션 요소를 저장해야 하는 공간의 범위를 가져옵니다.

GetUnmanagedValuesSource(TUnmanagedElement*, Int32)

네이티브 컬렉션 요소의 범위를 가져옵니다.

적용 대상