Show / Hide Table of Contents

Class NSResourceAgent

String resource substitution management.

Syntax
Examples
NSResourceAgent agent;
agent.callMethod(arg1, arg2);

Constructors

NSResourceAgent()

String resource substitution management.

Declaration
NSResourceAgent
Examples
NSResourceAgent agent;
agent.callMethod(arg1, arg2);

Methods

ActivateResourceSubstitution(String,String,Bool)

Activates or deactivates a resource substitution for one or more cultures

Declaration
Void ActivateResourceSubstitution(String resourceName, String culture, Bool isActive)
Parameters
Type Name Description
String resourceName

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

String culture

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

Bool isActive

New status of override.

Returns
Type Description
Void
Examples
NSResourceAgent agent;
String resourceName;
String culture;
Bool isActive;
agent.ActivateResourceSubstitution(resourceName, culture, isActive);

DeleteResourceSubstitution(String,String)

Permanently deletes a resource substitution for one or more cultures

Declaration
Void DeleteResourceSubstitution(String resourceName, String culture)
Parameters
Type Name Description
String resourceName

The name of the resource, without any brackets

String culture

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

Returns
Type Description
Void
Examples
NSResourceAgent agent;
String resourceName;
String culture;
agent.DeleteResourceSubstitution(resourceName, culture);

GetResourceSubstitutions(String[],String,Bool)

Gets substitutions for some or all resources for one culture

Declaration
NSResourceOverride[] GetResourceSubstitutions(String[] resourceNames, String culture, Bool activeOnly)
Parameters
Type Name Description
String[] resourceNames

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

String culture

.NET culture string; if empty, then get all

Bool activeOnly

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

Returns
Type Description
NSResourceOverride[]
Examples
NSResourceAgent agent;
String[] resourceNames;
String culture;
Bool activeOnly;
NSResourceOverride[] res = agent.GetResourceSubstitutions(resourceNames, culture, activeOnly);

IsResourceSubstitutionActive(String[],String)

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

Declaration
NSResourceOverride[] IsResourceSubstitutionActive(String[] resourceNames, String culture)
Parameters
Type Name Description
String[] resourceNames

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

String culture

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

Returns
Type Description
NSResourceOverride[]
Examples
NSResourceAgent agent;
String[] resourceNames;
String culture;
NSResourceOverride[] res = agent.IsResourceSubstitutionActive(resourceNames, culture);

SetResourceSubstitution(String,String,String,Bool)

Creates or updates a resource substitution

Declaration
Void SetResourceSubstitution(String resourceName, String resourceValues, String culture, Bool isActive)
Parameters
Type Name Description
String resourceName

The name of the resource, without any brackets

String resourceValues

The new value of the resource

String culture

The .NET culture string

Bool isActive

Is the substitution now active.

Returns
Type Description
Void
Examples
NSResourceAgent agent;
String resourceName;
String resourceValues;
String culture;
Bool isActive;
agent.SetResourceSubstitution(resourceName, resourceValues, culture, isActive);
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top