다음을 통해 공유


CborWriter.TryEncode(Span<Byte>, Int32) 메서드

정의

데이터의 인코딩된 표현을 destination에 쓰려고 합니다.

public:
 bool TryEncode(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryEncode (Span<byte> destination, out int bytesWritten);
member this.TryEncode : Span<byte> * int -> bool
Public Function TryEncode (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

매개 변수

destination
Span<Byte>

쓸 수 있는 버퍼입니다.

bytesWritten
Int32

이 메서드가 반환될 때 destination에 기록되는 바이트 수를 포함합니다.

반환

인코딩에 성공하면 true이고, destination이 너무 작으면 false입니다.

예외

기록기에 전체 CBOR 값 또는 루트 수준 값 시퀀스가 포함되어 있지 않습니다.

적용 대상