---
title: "Class Link"
slug: "web-sdk--stylelabs.m.base.web.api.models.link"
abstract: ""
---
# Class Link

Represents a link in a HAL resource.

## Inheritance

object

Link

## Namespace: StylelabsStylelabs.MStylelabs.M.BaseStylelabs.M.Base.WebStylelabs.M.Base.Web.ApiModels

## Assembly: Stylelabs.M.Sdk.WebClient.dll

## Syntax

```csharp
public class Link
```

## Constructors

### Link()

Initializes a new instance of the [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) class.

#### Declaration

```csharp
public Link()
```

### Link(string, string, bool)

Initializes a new instance of the [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) class.

#### Declaration

```csharp
public Link(string uri, string title, bool templated)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | uri | The initial [Uri](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |
| string | title | The initial [Title](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |
| bool | templated | The initial value of [Template](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### Link(string, string, string\[\])

Initializes a new instance of the [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) class.

#### Declaration

```csharp
public Link(string uri, string title, string[] filenameProperties)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | uri | The initial [Uri](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |
| string | title | The initial [Title](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |
| string | filenameProperties | The file properties. |

### Link(string, string)

Initializes a new instance of the [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) class.

#### Declaration

```csharp
public Link(string uri, string title)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | uri | The initial [Uri](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |
| string | title | The initial [Title](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### Link(string)

Initializes a new instance of the [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) class.

#### Declaration

```csharp
public Link(string uri)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | uri | The initial [Uri](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### Link(Uri, string, bool)

Initializes a new instance of the [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) class.

#### Declaration

```csharp
public Link(Uri uri, string title, bool templated)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| Uri | uri | The initial [Uri](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |
| string | title | The initial [Title](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |
| bool | templated | The initial value of [Template](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### Link(Uri, string)

Initializes a new instance of the [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) class.

#### Declaration

```csharp
public Link(Uri uri, string title)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| Uri | uri | The initial [Uri](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |
| string | title | The initial [Title](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

### Link(Uri)

Initializes a new instance of the [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) class.

#### Declaration

```csharp
public Link(Uri uri)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| Uri | uri | The initial [Uri](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html). |

## Properties

### FileNameProperties

Gets or sets the URI that points to the resource this link refers to.

#### Declaration

```csharp
public string[] FileNameProperties { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string | The URI. |

### Template

Gets or sets a value indicating whether the contained URI is a template.

#### Declaration

```csharp
public bool Template { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| bool | `true` if the URI is a template; otherwise, `false`. |

### Title

Gets or sets the title that describes this link.

#### Declaration

```csharp
public string Title { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string | A descriptive title for this link. |

### Uri

Gets or sets the URI that points to the resource this link refers to.

#### Declaration

```csharp
public string Uri { get; set; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string | The URI. |

## Operators

### implicit operator Link(string)

Operator.

#### Declaration

```csharp
public static implicit operator Link(string uri)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | uri | The uri. |

#### Returns

| Type | Description |
| --- | --- |
| [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) |  |

### implicit operator Link(Uri)

Operator.

#### Declaration

```csharp
public static implicit operator Link(Uri uri)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| Uri | uri | The uri. |

#### Returns

| Type | Description |
| --- | --- |
| [Link](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.base.web.api.models.link.html) |  |

### Extension Methods

[TemplateExtensions.Bind(Link, IDictionary<string, string>)](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.sdk.webclient.http.templateextensions.html)

[TemplateExtensions.Bind(Link, object)](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.sdk.webclient.http.templateextensions.html)

[TemplateExtensions.GetVariableValue(Link, Link, string)](https://doc.sitecore.com/ch/en/developers/api-reference/web-sdk--stylelabs.m.sdk.webclient.http.templateextensions.html)
