> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SuperOffice.WebApi.Agents.IResourceAgent

# \<a id="SuperOffice\_WebApi\_Agents\_IResourceAgent">\</a> Interface IResourceAgent

Namespace: [SuperOffice.WebApi.Agents](SuperOffice.WebApi.Agents.md)\
Assembly: SuperOffice.WebApi.dll

String resource substitution management.

```csharp theme={null}
public interface IResourceAgent : IAgentBase, IDisposable
```

#### Implements

[IAgentBase](SuperOffice.WebApi.Agents.IAgentBase.md),
[IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

## Methods

### \<a id="SuperOffice\_WebApi\_Agents\_IResourceAgent\_ActivateResourceSubstitutionAsync\_System\_String\_System\_String\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ActivateResourceSubstitutionAsync(string, string, bool, RequestOptions)

Activate or deactive a resource substitution for one or more cultures

```csharp theme={null}
Task ActivateResourceSubstitutionAsync(string resourceName, string culture, bool isActive, RequestOptions requestOptions = null)
```

#### Parameters

`resourceName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name of the resource, without any brackets; if blank then this is the MASTER SWITCH for the override system

`culture` [string](https://learn.microsoft.com/dotnet/api/system.string)

The .NET culture string; if blank, then ALL substitutions for this resource will be affected

`isActive` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

New status of override

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

This method has no return value

### \<a id="SuperOffice\_WebApi\_Agents\_IResourceAgent\_DeleteResourceSubstitutionAsync\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteResourceSubstitutionAsync(string, string, RequestOptions)

Permanentely delete a resource substitution for one or more cultures

```csharp theme={null}
Task DeleteResourceSubstitutionAsync(string resourceName, string culture, RequestOptions requestOptions = null)
```

#### Parameters

`resourceName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name of the resource, without any brackets

`culture` [string](https://learn.microsoft.com/dotnet/api/system.string)

The .NET culture string; if blank, then ALL substitutions for this resource will be dropped

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

This method has no return value

### \<a id="SuperOffice\_WebApi\_Agents\_IResourceAgent\_GetResourceSubstitutionsAsync\_System\_String\_\_\_System\_String\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetResourceSubstitutionsAsync(string\[], string, bool, RequestOptions)

Get substitutions for some or all resources for one culture

```csharp theme={null}
Task<ResourceOverride[]> GetResourceSubstitutionsAsync(string[] resourceNames, string culture, bool activeOnly, RequestOptions requestOptions = null)
```

#### Parameters

`resourceNames` [string](https://learn.microsoft.com/dotnet/api/system.string)\[]

Array of names of resources for which overrides are sought; if empty, then get all

`culture` [string](https://learn.microsoft.com/dotnet/api/system.string)

.NET culture string; if empty, then get all

`activeOnly` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

If true, then only resources with active substitutions will be returned; if false then ALL existing overrides will be returned

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ResourceOverride](SuperOffice.WebApi.Data.ResourceOverride.md)\[]\&gt;

Array of override objects, empty if there are none

### \<a id="SuperOffice\_WebApi\_Agents\_IResourceAgent\_IsResourceSubstitutionActiveAsync\_System\_String\_\_\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> IsResourceSubstitutionActiveAsync(string\[], string, RequestOptions)

Determine if resource substitution/override is active, globally or for a subset of resources/cultures

```csharp theme={null}
Task<ResourceOverride[]> IsResourceSubstitutionActiveAsync(string[] resourceNames, string culture, RequestOptions requestOptions = null)
```

#### Parameters

`resourceNames` [string](https://learn.microsoft.com/dotnet/api/system.string)\[]

Array of names of resources for which overrides are sought; if empty, then get the MASTER on/off

`culture` [string](https://learn.microsoft.com/dotnet/api/system.string)

.NET culture string; if empty, then get for all cultures (unless resourceName

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ResourceOverride](SuperOffice.WebApi.Data.ResourceOverride.md)\[]\&gt;

Array of override objects, empty if there are none; the ResourceValue member is not set by this call

### \<a id="SuperOffice\_WebApi\_Agents\_IResourceAgent\_SetResourceSubstitutionAsync\_System\_String\_System\_String\_System\_String\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SetResourceSubstitutionAsync(string, string, string, bool, RequestOptions)

Create or update a resource substitution

```csharp theme={null}
Task SetResourceSubstitutionAsync(string resourceName, string resourceValues, string culture, bool isActive, RequestOptions requestOptions = null)
```

#### Parameters

`resourceName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name of the resource, without any brackets

`resourceValues` [string](https://learn.microsoft.com/dotnet/api/system.string)

The new value of the resource

`culture` [string](https://learn.microsoft.com/dotnet/api/system.string)

The .NET culture string

`isActive` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Is the subsitution now active

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

This method has no return value


## Related topics

- [SuperOffice.WebApi.Agents.ResourceAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ResourceAgent.md)
- [SuperOffice.WebApi.Agents.IListAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IListAgent.md)
- [SuperOffice.WebApi.Agents.ListAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ListAgent.md)
- [SuperOffice.WebApi.Data.ResourceEntity](/en/api/reference/webapi/SuperOffice.WebApi.Data.ResourceEntity.md)
- [SuperOffice.WebApi.Agents.PreviewsAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.PreviewsAgent.md)
- [SuperOffice.WebApi.Agents.IPreviewsAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IPreviewsAgent.md)
