del método AudienceManager.GetAudienceNames
Obtiene una lista de objetos AudienceNameID que se corresponden con la lista especificada de identificadores únicos (globales GUID) de audiencia.
Espacio de nombres: Microsoft.Office.Server.Audience
Ensamblado: Microsoft.Office.Server.UserProfiles (en Microsoft.Office.Server.UserProfiles.dll)
Sintaxis
'Declaración
Public Function GetAudienceNames ( _
AudienceIDList As ArrayList _
) As ArrayList
'Uso
Dim instance As AudienceManager
Dim AudienceIDList As ArrayList
Dim returnValue As ArrayList
returnValue = instance.GetAudienceNames(AudienceIDList)
public ArrayList GetAudienceNames(
ArrayList AudienceIDList
)
Parámetros
AudienceIDList
Tipo: System.Collections.ArrayListobjeto ArrayList que contiene el GUID de la audiencia.
Valor devuelto
Tipo: System.Collections.ArrayList
objeto System.Collections.ArrayList que representa una lista de objetos AudienceNameID .
Comentarios
El método GetAudienceNames recupera una lista de objetos AudienceNameID que corresponden a la lista de audiencia GUID especificados en AudienceIDList.
Ejemplos
En el ejemplo de código siguiente se muestra cómo construir una ArrayList de GUID de audiencia e invocar el método GetAudienceNames .
ArrayList AudienceIDList = new ArrayList();
ArrayList AudienceNameList;
AudienceIDList.Add(new Guid("00000000-0000-0000-0000-000000000000"));
AudienceIDList.Add(new Guid("53581B32-8A7A-430E-893C-157B40BF41FF"));
AudienceNameList = AudMgr.GetAudienceNames(AudienceIDList);
if (AudienceNameList != null)
{
for (int i=0; i < AudienceNameList.Count; i++)
{
System.Console.WriteLine("{0}", i);
System.Console.WriteLine(((AudienceNameID)AudienceNameList[i]).AudienceID);
System.Console.WriteLine(((AudienceNameID)AudienceNameList[i]).AudienceName);
System.Console.WriteLine(((AudienceNameID)AudienceNameList[i]).bValid);
}
}
Dim AudienceIDList As New ArrayList()
Dim AudienceNameList As ArrayList
AudienceIDList.Add(New Guid("00000000-0000-0000-0000-000000000000"))
AudienceIDList.Add(New Guid("53581B32-8A7A-430E-893C-157B40BF41FF"))
AudienceNameList = AudMgr.GetAudienceNames(AudienceIDList)
If AudienceNameList IsNot Nothing Then
For i As Integer = 0 To AudienceNameList.Count - 1
System.Console.WriteLine("{0}", i)
System.Console.WriteLine((CType(AudienceNameList(i), AudienceNameID)).AudienceID)
System.Console.WriteLine((CType(AudienceNameList(i), AudienceNameID)).AudienceName)
System.Console.WriteLine((CType(AudienceNameList(i), AudienceNameID)).bValid)
Next i
End If