# KeyValuePairCopier&lt;TKey, TValue&gt; Methods

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

## DeepCopy(KeyValuePair&lt;TKey, TValue&gt;, CopyContext) {#deepcopy-system-collections-generic-keyvaluepair-tkey-tvalue-orleans-serializati-20facfdb}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.keyvaluepaircopier-2/methods/deepcopy-system-collections-generic-keyvaluepair-tkey-tvalue-orleans-serializati-20facfdb/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/KeyValuePairCodec.cs#L115-L116)

```csharp
public KeyValuePair<TKey, TValue> KeyValuePairCopier<TKey, DeepCopy(KeyValuePair<TKey, TValue> input, CopyContext context)
```

Creates a deep copy of the provided input.

### Parameters

- `input` (`KeyValuePair<TKey, TValue>`): The input.
- `context` (`CopyContext`): The context.

### Returns

A copy of `input`.

## IsShallowCopyable {#isshallowcopyable-88f987a6}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.keyvaluepaircopier-2/methods/isshallowcopyable-88f987a6/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/KeyValuePairCodec.cs#L108)

```csharp
public bool KeyValuePairCopier<TKey, IsShallowCopyable()
```

Returns true if the type is shallow-copyable.
