# Codec_EventHubBatchContainer.Serialize(Writer&lt;TBufferWriter&gt;, EventHubBatchContainer)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleanscodegen.orleans.streaming.eventhubs.codec-eventhubbatchcontainer/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleanscodegen.orleans.streaming.eventhubs.codec-eventhubbatchcontainer/methods/)

```csharp
public void Serialize<TBufferWriter>(ref Writer<TBufferWriter> writer, EventHubBatchContainer instance)
```

Serializes the provided value.

### Parameters

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