# Codec_ConcurrentQueueSurrogate&lt;T&gt; Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-concurrentqueuesurrogate-1/)

## Deserialize(Reader&lt;TReaderInput&gt;, ConcurrentQueueSurrogate&lt;T&gt;) {#deserialize-1-ref-orleans-serialization-buffers-reader-treaderinput-ref-orleans-bbff0fd8}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-concurrentqueuesurrogate-1/methods/deserialize-1-ref-orleans-serialization-buffers-reader-treaderinput-ref-orleans-bbff0fd8/)

```csharp
public void Deserialize<TReaderInput>(ref Reader<TReaderInput> reader, scoped ref ConcurrentQueueSurrogate<T> instance)
```

Deserializes the specified type.

### Parameters

- `reader` (`Reader<TReaderInput>`): The reader.
- `instance` (`ConcurrentQueueSurrogate<T>`): The value.

## ReadValue(Reader&lt;TReaderInput&gt;, Field) {#readvalue-1-ref-orleans-serialization-buffers-reader-treaderinput-orleans-serial-597ace70}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-concurrentqueuesurrogate-1/methods/readvalue-1-ref-orleans-serialization-buffers-reader-treaderinput-orleans-serial-597ace70/)

```csharp
public ConcurrentQueueSurrogate<T> ReadValue<TReaderInput>(ref Reader<TReaderInput> reader, Field field)
```

Reads a value.

### Parameters

- `reader` (`Reader<TReaderInput>`): The reader.
- `field` (`Field`): The field.

### Returns

The value.

## Serialize(Writer&lt;TBufferWriter&gt;, ConcurrentQueueSurrogate&lt;T&gt;) {#serialize-1-ref-orleans-serialization-buffers-writer-tbufferwriter-ref-orleans-s-692204b7}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-concurrentqueuesurrogate-1/methods/serialize-1-ref-orleans-serialization-buffers-writer-tbufferwriter-ref-orleans-s-692204b7/)

```csharp
public void Serialize<TBufferWriter>(ref Writer<TBufferWriter> writer, scoped ref ConcurrentQueueSurrogate<T> instance)
```

Serializes the provided value.

### Parameters

- `writer` (`Writer<TBufferWriter>`): The writer.
- `instance` (`ConcurrentQueueSurrogate<T>`): The value.

## WriteField(Writer&lt;TBufferWriter&gt;, uint, Type, ConcurrentQueueSurrogate&lt;T&gt;) {#writefield-1-ref-orleans-serialization-buffers-writer-tbufferwriter-uint-system-7df7db02}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-concurrentqueuesurrogate-1/methods/writefield-1-ref-orleans-serialization-buffers-writer-tbufferwriter-uint-system-7df7db02/)

```csharp
public void WriteField<TBufferWriter>(ref Writer<TBufferWriter> writer, uint fieldIdDelta, Type expectedType, ConcurrentQueueSurrogate<T> value)
```

Writes a field.

### Parameters

- `writer` (`Writer<TBufferWriter>`): The writer.
- `fieldIdDelta` (`uint`): The field identifier delta.
- `expectedType` (`Type`): The expected type.
- `value` (`ConcurrentQueueSurrogate<T>`): The value.
