---
title: "Class TemplateVariableTypeMapper"
slug: "sdk--stylelabs.m.sdk.mappers.templatevariabletypemapper"
abstract: ""
---
# Class TemplateVariableTypeMapper

Template variable type mapper.

## Inheritance

object

TemplateVariableTypeMapper

## Namespace: StylelabsStylelabs.MSdkMappers

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public static class TemplateVariableTypeMapper
```

## Methods

### Map(TemplateVariableType?)

Maps a [TemplateVariableType](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.notifications.templatevariabletype.html) to a string.

#### Declaration

```csharp
public static string Map(TemplateVariableType? type)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [TemplateVariableType](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.notifications.templatevariabletype.html) | type | The [TemplateVariableType](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.notifications.templatevariabletype.html) to map. |

#### Returns

| Type | Description |
| --- | --- |
| string | A string. |

#### Exceptions

| Type | Condition |
| --- | --- |
| [InternalException](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.exceptions.internalexception.html) | If the [TemplateVariableType](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.notifications.templatevariabletype.html) could be mapped. |

### Map(string)

Maps a string to a [TemplateVariableType](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.notifications.templatevariabletype.html).

#### Declaration

```csharp
public static TemplateVariableType? Map(string type)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | type | The string type to map. |

#### Returns

| Type | Description |
| --- | --- |
| [TemplateVariableType](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.notifications.templatevariabletype.html) | The [TemplateVariableType](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.contracts.notifications.templatevariabletype.html). |

#### Exceptions

| Type | Condition |
| --- | --- |
| [InternalException](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.exceptions.internalexception.html) | If the string could be map. |
