Compartilhar via


ReferenceCodec.TryWriteReferenceField Método

Definição

Sobrecargas

TryWriteReferenceField<TBufferWriter>(Writer<TBufferWriter>, UInt32, Type, Object)

Escreva uma referência de objeto se value já tiver sido gravado e tiver sido rastreado por meio de RecordObject(SerializerSession, Object).

TryWriteReferenceField<TBufferWriter>(Writer<TBufferWriter>, UInt32, Type, Type, Object)

Escreva uma referência de objeto se value já tiver sido gravado e tiver sido rastreado por meio de RecordObject(SerializerSession, Object). ///

TryWriteReferenceField<TBufferWriter>(Writer<TBufferWriter>, UInt32, Type, Object)

Escreva uma referência de objeto se value já tiver sido gravado e tiver sido rastreado por meio de RecordObject(SerializerSession, Object).

public static bool TryWriteReferenceField<TBufferWriter> (ref Orleans.Serialization.Buffers.Writer<TBufferWriter> writer, uint fieldId, Type expectedType, object value) where TBufferWriter : System.Buffers.IBufferWriter<byte>;
static member TryWriteReferenceField : Writer * uint32 * Type * obj -> bool (requires 'BufferWriter :> System.Buffers.IBufferWriter<byte>)
Public Shared Function TryWriteReferenceField(Of TBufferWriter As IBufferWriter(Of Byte)) (ByRef writer As Writer(Of TBufferWriter), fieldId As UInteger, expectedType As Type, value As Object) As Boolean

Parâmetros de tipo

TBufferWriter

O tipo de gravador de buffer.

Parâmetros

writer
Writer<TBufferWriter>

O gravador.

fieldId
UInt32

O identificador de campo.

expectedType
Type

O tipo esperado.

value
Object

O valor.

Retornos

truese uma referência tiver sido escrita, caso contrário. false

Aplica-se a

TryWriteReferenceField<TBufferWriter>(Writer<TBufferWriter>, UInt32, Type, Type, Object)

Escreva uma referência de objeto se value já tiver sido gravado e tiver sido rastreado por meio de RecordObject(SerializerSession, Object). ///

public static bool TryWriteReferenceField<TBufferWriter> (ref Orleans.Serialization.Buffers.Writer<TBufferWriter> writer, uint fieldId, Type expectedType, Type actualType, object value) where TBufferWriter : System.Buffers.IBufferWriter<byte>;
static member TryWriteReferenceField : Writer * uint32 * Type * Type * obj -> bool (requires 'BufferWriter :> System.Buffers.IBufferWriter<byte>)
Public Shared Function TryWriteReferenceField(Of TBufferWriter As IBufferWriter(Of Byte)) (ByRef writer As Writer(Of TBufferWriter), fieldId As UInteger, expectedType As Type, actualType As Type, value As Object) As Boolean

Parâmetros de tipo

TBufferWriter

O tipo de gravador de buffer.

Parâmetros

writer
Writer<TBufferWriter>

O gravador.

fieldId
UInt32

O identificador de campo.

expectedType
Type

O tipo esperado.

actualType
Type

O tipo real.

value
Object

O valor.

Retornos

truese uma referência tiver sido escrita, caso contrário. false

Comentários

Essa sobrecarga permite especificar um tipo de referência fixo para codecs que implementam IDerivedTypeCodec.

Aplica-se a