Retrieves the highest container membership match for a UC entity.

Namespace:  Microsoft.Rtc.Collaboration.Presence
Assembly:  Microsoft.Rtc.Collaboration(in Microsoft.Rtc.Collaboration.dll)

Syntax

Visual Basic (Declaration)
Public 
Shared 
Function 
GetMembershipLevel ( _
	
uri 
As 
String, _
	
sourceNetworkType 
As 

SourceNetwork, _
	
containers 
As 
IEnumerable(
Of 

ContainerMembership) _
) 
As 
Integer
C#
public 
static 
int 
GetMembershipLevel(
	
string 
uri,
	

SourceNetwork 
sourceNetworkType,
	
IEnumerable<

ContainerMembership> 
containers
)
Visual C++
public:
static 
int 
GetMembershipLevel(
	
String^ 
uri, 
	

SourceNetwork 
sourceNetworkType, 
	
IEnumerable<

ContainerMembership^>^ 
containers
)
JavaScript

Microsoft.Rtc.Collaboration.Presence.ContainerMembership.
getMembershipLevel = 
function(
uri, 
sourceNetworkType, 
containers);

Parameters

uri
Type: String
URI of the UC entity.
sourceNetworkType
Type: Microsoft.Rtc.Collaboration . . :: . SourceNetwork
Network type that this entity belongs to.
containers
Type: IEnumerable < (Of < ( ContainerMembership > ) > )
List of containers where the search has to be performed.

Return Value

The highest container that this entity belongs to.

Remarks

If no membership match found, -1 is returned. Containers in the list should have unique container ids.

Matching will be performed in the following order: 1) Exact URI match 2) Best domain match 3) Source network type match

Exceptions

Exception Condition
ArgumentNullException Thrown when containersor URIpassed are null.
ArgumentException Thrown when URIis not valid or if there are duplicate containers in containersor if sourceNetworkTypeis invalid.

See Also