# GeneratedBatchContainer Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.generator.generatedbatchcontainer/)

## GetEvents {#getevents-1-b8f11de7}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.generator.generatedbatchcontainer/methods/getevents-1-b8f11de7/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Generator/Generators/GeneratedBatchContainer.cs#L61)

```csharp
public IEnumerable<Tuple<T, StreamSequenceToken>> GetEvents<T>()
```

Gets events of a specific type from the batch.

## ImportRequestContext {#importrequestcontext-96a9b9ee}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.generator.generatedbatchcontainer/methods/importrequestcontext-96a9b9ee/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Generator/Generators/GeneratedBatchContainer.cs#L67)

```csharp
public bool ImportRequestContext()
```

Gives an opportunity to [IBatchContainer](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.ibatchcontainer/) to set any data in the [RequestContext](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.requestcontext/) before this [IBatchContainer](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.streams.ibatchcontainer/) is sent to consumers. It can be the data that was set at the time event was generated and enqueued into the persistent provider or any other data.

### Returns

`true` if the [RequestContext](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.requestcontext/) was indeed modified, `false` otherwise.
