# FieldCodecTester&lt;TValue, TCodec&gt; Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/)

## CanRoundTripCollectionViaSerializer {#canroundtripcollectionviaserializer-7f8cd4f2}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canroundtripcollectionviaserializer-7f8cd4f2/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L590-L626)

```csharp
public void FieldCodecTester<TValue, CanRoundTripCollectionViaSerializer()
```

Checks whether a strongly typed collection of values can be round-tripped.

## CanRoundTripDefaultValueViaCodec {#canroundtripdefaultvalueviacodec-e07eadd8}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canroundtripdefaultvalueviacodec-e07eadd8/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L810)

```csharp
public void FieldCodecTester<TValue, CanRoundTripDefaultValueViaCodec()
```

Checks if round-tripped default values are equal.

## CanRoundTripTupleViaSerializer {#canroundtriptupleviaserializer-a0346e7a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canroundtriptupleviaserializer-a0346e7a/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L682-L713)

```csharp
public void FieldCodecTester<TValue, CanRoundTripTupleViaSerializer()
```

Checks if values can be round-tripped when used as a field in a tuple.

## CanRoundTripViaObjectSerializer {#canroundtripviaobjectserializer-78fe0745}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canroundtripviaobjectserializer-78fe0745/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L759-L798)

```csharp
public void FieldCodecTester<TValue, CanRoundTripViaObjectSerializer()
```

Checks if values can be round-tripped through `Orleans.Serialization.Serializer-1` when using `System.Object` as the type parameter.

## CanRoundTripViaSerializer {#canroundtripviaserializer-f70aea3a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canroundtripviaserializer-f70aea3a/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L721-L751)

```csharp
public void FieldCodecTester<TValue, CanRoundTripViaSerializer()
```

Checks if values can be round-tripped through `Orleans.Serialization.Serializer-1` when using `TValue` as the type parameter.

## CanRoundTripViaSerializer_Array {#canroundtripviaserializer-array-a982cb2c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canroundtripviaserializer-array-a982cb2c/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L295-L323)

```csharp
public void FieldCodecTester<TValue, CanRoundTripViaSerializer_Array()
```

Checks whether the codec correctly round-trips values when writing to an array.

## CanRoundTripViaSerializer_Memory {#canroundtripviaserializer-memory-e045cf6e}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canroundtripviaserializer-memory-e045cf6e/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L331-L359)

```csharp
public void FieldCodecTester<TValue, CanRoundTripViaSerializer_Memory()
```

Checks whether the codec correctly round-trips values when writing to a memory slice.

## CanRoundTripViaSerializer_MemoryStream {#canroundtripviaserializer-memorystream-06149c56}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canroundtripviaserializer-memorystream-06149c56/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L367-L402)

```csharp
public void FieldCodecTester<TValue, CanRoundTripViaSerializer_MemoryStream()
```

Checks whether the codec correctly round-trips values when writing to a memory stream.

## CanRoundTripViaSerializer_ReadByteByByte {#canroundtripviaserializer-readbytebybyte-eace2d98}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canroundtripviaserializer-readbytebybyte-eace2d98/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L410-L441)

```csharp
public void FieldCodecTester<TValue, CanRoundTripViaSerializer_ReadByteByByte()
```

Checks whether the codec correctly round-trips values when reading byte-by-byte, simulating fragmented reads.

## CanRoundTripViaSerializer_Span {#canroundtripviaserializer-span-2e2df409}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canroundtripviaserializer-span-2e2df409/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L259-L287)

```csharp
public void FieldCodecTester<TValue, CanRoundTripViaSerializer_Span()
```

Checks whether the codec correctly round-trips values when writing to a span.

## CanRoundTripViaSerializer_StreamPooled {#canroundtripviaserializer-streampooled-f23c51ca}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canroundtripviaserializer-streampooled-f23c51ca/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L221-L251)

```csharp
public void FieldCodecTester<TValue, CanRoundTripViaSerializer_StreamPooled()
```

Checks whether the codec correctly round-trips values when using a pooled stream.

## CanRoundTripWeaklyTypedCollectionViaSerializer {#canroundtripweaklytypedcollectionviaserializer-13709337}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canroundtripweaklytypedcollectionviaserializer-13709337/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L634-L674)

```csharp
public void FieldCodecTester<TValue, CanRoundTripWeaklyTypedCollectionViaSerializer()
```

Checks whether a strongly typed collection of values can be round-tripped.

## CanSkipDefaultValue {#canskipdefaultvalue-5185ec86}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canskipdefaultvalue-5185ec86/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L822)

```csharp
public void FieldCodecTester<TValue, CanSkipDefaultValue()
```

Checks if default values can be skipped over.

## CanSkipValue {#canskipvalue-ba1b266f}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/canskipvalue-ba1b266f/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L816)

```csharp
public void FieldCodecTester<TValue, CanSkipValue()
```

Checks if values can be skipped over.

## CorrectlyAdvancesReferenceCounter {#correctlyadvancesreferencecounter-52e1b21c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/correctlyadvancesreferencecounter-52e1b21c/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L174-L213)

```csharp
public void FieldCodecTester<TValue, CorrectlyAdvancesReferenceCounter()
```

Checks whether the codec correctly advances the reference counter when writing to a pipe and reading from a pipe.

## CorrectlyAdvancesReferenceCounterStream {#correctlyadvancesreferencecounterstream-45aaf72c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/correctlyadvancesreferencecounterstream-45aaf72c/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L118-L166)

```csharp
public void FieldCodecTester<TValue, CorrectlyAdvancesReferenceCounterStream()
```

Checks whether the codec correctly advances the reference counter when writing to a stream and reading from a stream.

## CorrectlyHandlesBuffers {#correctlyhandlesbuffers-58bd992e}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/correctlyhandlesbuffers-58bd992e/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L830-L851)

```csharp
public void FieldCodecTester<TValue, CorrectlyHandlesBuffers()
```

Checks if buffers are handled correctly.

## ProducesValidBitStream {#producesvalidbitstream-39883089}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/producesvalidbitstream-39883089/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L449-L476)

```csharp
public void FieldCodecTester<TValue, ProducesValidBitStream()
```

Checks whether the codec produces a valid bit stream.

## RoundTrippedValuesEqual {#roundtrippedvaluesequal-aa3e5fbb}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/roundtrippedvaluesequal-aa3e5fbb/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L804)

```csharp
public void FieldCodecTester<TValue, RoundTrippedValuesEqual()
```

Checks if round-tripped values are equal.

## WritersProduceSameResults {#writersproducesameresults-193a7879}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization.testkit/orleans.serialization.testkit.fieldcodectester-2/methods/writersproducesameresults-193a7879/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.TestKit/FieldCodecTester.cs#L484-L582)

```csharp
public void FieldCodecTester<TValue, WritersProduceSameResults()
```

Checks whether various buffer writers produce bit-wise identical results.
