Skip to content

Reference

OpcArgumentGlobalization Members

Provides mechanisms to control the localization of data and information used by an argument.

Reference

OpcArgumentGlobalization Members ​

Type
OpcArgumentGlobalization
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Properties ​

Cultures ​

Gets a sequence of CultureInfo objects associated with the resources maintained by the current OpcArgumentGlobalization.

csharp
public IEnumerable<CultureInfo> Cultures { get; }
vbnet
Public ReadOnly Property Cultures As IEnumerable(Of CultureInfo)

Property value

IEnumerable<CultureInfo>

An IEnumerable<T> of unique CultureInfo objects.

Locales ​

Gets a sequence of string objects representing the Name of the Cultures associated with the resources maintained by the current OpcArgumentGlobalization.

csharp
public IEnumerable<string> Locales { get; }
vbnet
Public ReadOnly Property Locales As IEnumerable(Of String)

Property value

IEnumerable<String>

An IEnumerable<T> of unique string objects.

Values ​

Gets a sequence of string objects representing the resources associated with the Cultures maintained by the current OpcArgumentGlobalization.

csharp
public IEnumerable<string> Values { get; }
vbnet
Public ReadOnly Property Values As IEnumerable(Of String)

Property value

IEnumerable<String>

An IEnumerable<T> of string objects.

Methods ​

Add ​

2 overloads

OverloadDescription
Add(string, string)Adds or overrides the specified resource value associated with the culture identified by cultureName.
Add(CultureInfo, string)Adds or overrides the specified resource value associated with the culture specified.

Add(string, string) ​

Adds or overrides the specified resource value associated with the culture identified by cultureName.

csharp
public void Add(string cultureName, string value)
vbnet
Public Sub Add(cultureName As String, value As String)

Parameters

NameTypeDescription
cultureNameStringThe Name of a well known non-neutral CultureInfo.
valueStringThe string value of the resource.

Exceptions

ExceptionCondition
ArgumentExceptionThe cultureName is an empty string or the CultureInfo referred to by cultureName is a neutral culture.
ArgumentNullExceptionThe cultureName is a null reference (Nothing in Visual Basic).
CultureNotFoundExceptionThe culture specified by cultureName does not refer to a well known culture.

Add(CultureInfo, string) ​

Adds or overrides the specified resource value associated with the culture specified.

csharp
public void Add(CultureInfo culture, string value)
vbnet
Public Sub Add(culture As CultureInfo, value As String)

Parameters

NameTypeDescription
cultureCultureInfoThe non-neutral CultureInfo.
valueStringThe string value of the resource.

Exceptions

ExceptionCondition
ArgumentExceptionThe culture is a neutral culture.
ArgumentNullExceptionThe culture is a null reference (Nothing in Visual Basic).

Clear ​

Removes all resources associated with the Cultures.

csharp
public void Clear()
vbnet
Public Sub Clear()

Remove ​

2 overloads

OverloadDescription
Remove(string)Removes the resource associated with the culture identified by cultureName.
Remove(CultureInfo)Removes the resource associated with the culture specified.

Remove(string) ​

Removes the resource associated with the culture identified by cultureName.

csharp
public void Remove(string cultureName)
vbnet
Public Sub Remove(cultureName As String)

Parameters

NameTypeDescription
cultureNameStringThe Name of a well known non-neutral CultureInfo.

Exceptions

ExceptionCondition
ArgumentExceptionThe cultureName is an empty string or the CultureInfo referred to by cultureName is a neutral culture.
ArgumentNullExceptionThe cultureName is a null reference (Nothing in Visual Basic).
CultureNotFoundExceptionThe culture specified by cultureName does not refer to a well known culture.

Remove(CultureInfo) ​

Removes the resource associated with the culture specified.

csharp
public void Remove(CultureInfo culture)
vbnet
Public Sub Remove(culture As CultureInfo)

Parameters

NameTypeDescription
cultureCultureInfoThe non-neutral CultureInfo.

Exceptions

ExceptionCondition
ArgumentExceptionThe culture is a neutral culture.
ArgumentNullExceptionThe culture is a null reference (Nothing in Visual Basic).

Translate ​

Translates the text into the preferred locales of the context using the resources maintained by the current OpcArgumentGlobalization.

csharp
public OpcText Translate(OpcContext context, OpcText text)
vbnet
Public Function Translate(context As OpcContext, text As OpcText) As OpcText

Parameters

NameTypeDescription
contextOpcContextThe OpcContext which provides the preferred locales.
textOpcTextThe OpcText to translate.

Returns

OpcText

The resource of the first preferred locale which has a resource; otherwise a resource of the same language as a preferred locale; otherwise the text.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe context or text is a null reference (Nothing in Visual Basic).
CultureNotFoundExceptionA preferred locale of the context does not refer to a well known culture.

Remarks

If the first preferred locale is the locale of the text, the text is returned unchanged.