Microsoft Identity Integration Server 2003 Developer Reference

IMASynchronization.ResolveJoinSearch

The ResolveJoinSearch method is called when a join rule is configured to use a rules extension to resolve conflicts, and when one or more results from a metaverse search match the values that are generated by the IMASynchronization.MapAttributesForJoin method.
[C#]
public Boolean ResolveJoinSearch(
  String joinCriteriaName,
  CSEntry csentry,
  MVEntry[] rgmventry,
  out Int32 imventry,
  ref String MVObjectType
);
[Visual Basic .NET]
Public Function ResolveJoinSearch( _
  ByVal joinCriteriaName As String, _
  ByVal csentry As CSEntry, _
  ByVal rgmventry() As MVEntry, _
  ByRef imventry As Int32, _
  ByRef MVObjectType As String _
) As Boolean
Implements IMASynchronization.ResolveJoinSearch

Parameters

joinCriteriaName
Contains a string that contains the name of the join criteria. You must use only alphanumeric characters for the joinCriteriaName parameter, otherwise you can encounter problems in a rules extension.
csentry
Contains the CSEntry object that represents the connector space entry that will be joined to the metaverse entry.
rgmventry
Contains an array of MVEntry objects that represent the metaverse entries that match the join operation criteria. On return, the imventry parameter receives the index of the object in this array to which the connector space entry will be joined.
imventry
[out] If the method returns true, this parameter receives the index of the object in the rgmventry parameter to which the connector space entry will be joined.
MVObjectType
Contains a string that contains the name of the metaverse class.

Return Values

Returns True if the join operation can be resolved. The imventry parameter receives the index of the object in the rgmventry array to which the connector space entry will be joined.

Returns False if the connector space entry should not be joined to any of the metaverse entries.

Exceptions

Exception type Condition
EntryPointNotImplementedException The rules extension does not implement this method.
UnexpectedDataException The method received unexpected data.

Example Code

The following example shows an implementation of this method. The method returns True and sets the index number of the MVEntry in the collection if there is an MVEntry object type that is equal to the CSEntry object type. If there is no match, the method returns False and the index number is set to -1.

[Visual Basic .NET]
Public Function ResolveJoinSearch(ByVal JoinResolution As String, _
		ByVal csentry As CSEntry, _
		ByVal rgmventry() As MVEntry, _
		ByRef imventry As Integer, ByRef MVObjectClass As String) _
		As Boolean Implements IMASynchronization.ResolveJoinSearch

	ResolveJoinSearch = False
	imventry = -1

	If csentry("employeeType").IsPresent Then
		Dim csemployeeType As String
		Dim mventry As MVEntry
		Dim index As Int32

		index = 0
		csemployeeType = csentry("employeeType").Value

			For Each mventry In rgmventry
				If mventry("employeeType").IsPresent AndAlso _
					mventry("employeeType").Value.Equals(csemployeeType) Then
					ResolveJoinSearch = True
					imventry = index
					Exit Function
				End If
				index = index + 1
			Next
		End If

End Function
[C#]
bool IMASynchronization.ResolveJoinSearch (string JoinResolution, 
	CSEntry csentry,
	MVEntry[] rgmventry, 
	out int iMVEntry, 
	ref string MvObjectClass)

{
	bool ReturnValue = false;
	iMVEntry = -1;

	if (csentry["employeeType"].IsPresent)
	{
		string csemployeeType = csentry["employeeType"].Value;
		int index = 0;
		foreach (MVEntry mventry in rgmventry)
		{
			if (mventry["employeeType"].IsPresent && 
				mventry["employeeType"].Value.Equals(csemployeeType))
			{
				ReturnValue = true;
				iMVEntry = index;
				return ReturnValue;
		}
			index ++;
	}
}

	return ReturnValue;
}

Requirements

Product: Microsoft Identity Integration Server 2003
Namespace: Defined in Microsoft.MetadirectoryServices.
Assembly: Requires Microsoft.MetadirectoryServices (in Microsoft.MetadirectoryServices.dll).
.NET Framework: Requires .NET Framework 1.1.

See Also

CSEntry, IMASynchronization, MVEntry