# GuidCodec Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.guidcodec/)

## ReadRaw(Reader&lt;TInput&gt;) {#readraw-1-ref-orleans-serialization-buffers-reader-tinput-d95efec0}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.guidcodec/methods/readraw-1-ref-orleans-serialization-buffers-reader-tinput-d95efec0/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/GuidCodec.cs#L103-L110)

```csharp
public static Guid ReadRaw<TInput>(ref Reader<TInput> reader)
```

Reads the raw GUID content.

### Parameters

- `reader` (`Reader<TInput>`)

## ReadValue(Reader&lt;TInput&gt;, Field) {#readvalue-1-ref-orleans-serialization-buffers-reader-tinput-orleans-serializatio-3f231f2d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.guidcodec/methods/readvalue-1-ref-orleans-serialization-buffers-reader-tinput-orleans-serializatio-3f231f2d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/GuidCodec.cs#L54-L64)

```csharp
public static Guid ReadValue<TInput>(ref Reader<TInput> reader, Field field)
```

Reads a value.

### Parameters

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

### Returns

The value.

## WriteField(Writer&lt;TBufferWriter&gt;, uint, Guid) {#writefield-1-ref-orleans-serialization-buffers-writer-tbufferwriter-uint-system-78c14bd3}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.guidcodec/methods/writefield-1-ref-orleans-serialization-buffers-writer-tbufferwriter-uint-system-78c14bd3/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/GuidCodec.cs#L36-L40)

```csharp
public static void WriteField<TBufferWriter>(ref Writer<TBufferWriter> writer, uint fieldIdDelta, Guid value)
```

Writes a field without type info (expected type is statically known).

### Parameters

- `writer` (`Writer<TBufferWriter>`): The writer.
- `fieldIdDelta` (`uint`): The field identifier delta.
- `value` (`Guid`): The value.

## WriteRaw(Writer&lt;TBufferWriter&gt;, Guid) {#writeraw-1-ref-orleans-serialization-buffers-writer-tbufferwriter-system-guid-08d19c1c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.guidcodec/methods/writeraw-1-ref-orleans-serialization-buffers-writer-tbufferwriter-system-guid-08d19c1c/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/GuidCodec.cs#L73-L94)

```csharp
public static void WriteRaw<TBufferWriter>(ref Writer<TBufferWriter> writer, Guid value)
```

Writes the raw GUID content.

### Parameters

- `writer` (`Writer<TBufferWriter>`)
- `value` (`Guid`)
