---
title: "Interface IRepositoryFileProtectionProvider | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Storage.Repositories.Interfaces.Protectors/IRepositoryFileProtectionProvider/"
---

# Interface IRepositoryFileProtectionProvider

> `System.Boolean`

###### **Namespace**: [Aurigma.DesignAtoms.Storage.Repositories.Interfaces.Protectors](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Storage.Repositories.Interfaces.Protectors.md)

###### **Assembly**: Aurigma.DesignAtoms.dll

```csharp title="Syntax"
public interface IRepositoryFileProtectionProvider
```

## Methods

### IsProtected

```csharp
bool IsProtected(string fileId)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileId* |  |

##### Returns

### IsProtectedAsync

```csharp
Task<bool> IsProtectedAsync(string fileId)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileId* |  |

##### Returns

`System.Threading.Tasks.Task<System.Boolean>`

### TrySetProtection

```csharp
bool TrySetProtection(string fileId, bool isProtected)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileId* |  |
| `System.Boolean` | *isProtected* |  |

##### Returns

`System.Boolean`

### TrySetProtectionAsync

```csharp
Task<bool> TrySetProtectionAsync(string fileId, bool isProtected)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileId* |  |
| `System.Boolean` | *isProtected* |  |

##### Returns

`System.Threading.Tasks.Task<System.Boolean>`
