Partager via


ManagementAgent.NormalizeString Method

Normalizes the case and accents in a string according to the setting for that particular management agent (MA). By calling this function, you can normalize the string according to the connected directory format during provisioning. As a result, when the management agent string is imported back to the connector space from the target directory, the imported string value is the same as what was written to the connector space at provisioning time, allowing confirmation of the export.

Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in Microsoft.MetadirectoryServicesEx.dll)

Usage

'Usage
Dim instance As ManagementAgent
Dim value As String
Dim returnValue As String

returnValue = instance.NormalizeString(value)

Syntax

'Declaration
Public MustOverride Function NormalizeString ( _
    value As String _
) As String
public abstract string NormalizeString (
    string value
)
public:
virtual String^ NormalizeString (
    String^ value
) abstract
public abstract String NormalizeString (
    String value
)
public abstract function NormalizeString (
    value : String
) : String

Parameters

  • value
    Text string to normalize. The string is changed to uppercase, and accents are normalized to the user interface for the MA.

Return Value

Returns a String.

Exceptions

Exception type Condition
System.ArgumentException

An input text string must be specified.

System.ArgumentNullException

The argument is null.

System.OutOfMemoryException

A memory allocation failure occurred.

Remarks

Certain directories, such as RACF (Resource Access Control Facility), TopSecret, or ACF2, change text strings that are imported into the directory to remove accents from text characters, or to make the text strings all uppercase. When data from the management agent is imported back into the connector space (CS), the string in the connector space is not the same as what was staged for export, because the directory modified the value. When you use this method, you can set case rules on the string, which makes the string all uppercase, or accent rules, which removes accent characters from the string. Because normalization is carried out only in outbound synchronization, setting the initial value of an attribute in the CS where the configuration specifies normalizing both case and accents yields the following:

  • The MV attribute value is café.

  • On initial attribute setting, or during EAF, using NormalizeString transforms the value (assuming both case and accents are configured in the UI) to CAFE.

  • The CS attribute is exported to RACF as CAFE.

  • At a later stage, the CAFE value is imported, and the unconfirmed change is cleared.

MV Data flow CS uses NormalizeString Data flow Connected directory

café

–––>

Initial attribute value (provisioning) or EAF

String is normalized

café<––>CAFE

––>

Export

CAFE

RACF Directory

café

–––>

Exported data is reimported

CAFE<––>CAFE

<––

Stage

CAFE

RACF Directory

This method is used on the Extensible Management Agent and the XML Management Agent. The management agents can be call-based or file-based.

After you create the management agent that contains this method, you must use the Synchronization Service Manager UI to set the options for how the string should be normalized. In Synchronization Service Manager, you must create a new management agent. In Create Management Agent, on the Configure Connection Information page, you can set the management agents as call-based or file-based. For step type, select Import and Export. On the Configure Attributes page, there are two check boxes: Upper Case and Remove Accents. Select one or both options.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

ManagementAgent Class
ManagementAgent Members
Microsoft.MetadirectoryServices Namespace
ManagementAgent Class