# ArcBufferWriterWrapper Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.arcbufferwriterwrapper/)

## Advance(int) {#advance-int-dcef2f83}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.arcbufferwriterwrapper/methods/advance-int-dcef2f83/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Buffers/Writer.cs#L117)

```csharp
public void Advance(int count)
```

Notifies the `System.Buffers.IBufferWriter-1` that `count` data items were written to the output `System.Span-1` or `System.Memory-1`.

### Parameters

- `count` (`int`): The number of data items written to the `System.Span-1` or `System.Memory-1`.

## GetMemory(int) {#getmemory-int-e5446897}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.arcbufferwriterwrapper/methods/getmemory-int-e5446897/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Buffers/Writer.cs#L120)

```csharp
public Memory<byte> GetMemory(int sizeHint = 0)
```

Returns a `System.Memory-1` to write to that is at least the requested size (specified by `sizeHint`).

### Parameters

- `sizeHint` (`int`): The minimum length of the returned `System.Memory-1`. If 0, a non-empty buffer is returned.

### Returns

A `System.Memory-1` of at least the size `sizeHint`. If `sizeHint` is 0, returns a non-empty buffer.

### Exceptions

- `System.OutOfMemoryException`: The requested buffer size is not available.

## GetSpan(int) {#getspan-int-4964244d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.arcbufferwriterwrapper/methods/getspan-int-4964244d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Buffers/Writer.cs#L123)

```csharp
public Span<byte> GetSpan(int sizeHint = 0)
```

Returns a `System.Span-1` to write to that is at least the requested size (specified by `sizeHint`).

### Parameters

- `sizeHint` (`int`): The minimum length of the returned `System.Span-1`. If 0, a non-empty buffer is returned.

### Returns

A `System.Span-1` of at least the size `sizeHint`. If `sizeHint` is 0, returns a non-empty buffer.
