Application.ApplicationCollection Class
Enumerates the enterprise application definitions.
Inheritance Hierarchy
System.Object
Microsoft.SharePoint.Portal.SingleSignon.Application.ApplicationCollection
Namespace: Microsoft.SharePoint.Portal.SingleSignon
Assembly: Microsoft.SharePoint.Portal.SingleSignon (in Microsoft.SharePoint.Portal.SingleSignon.dll)
Syntax
'Declaration
<SingleSignonPermissionAttribute(SecurityAction.Demand, Access := SingleSignonAccess.Minimal)> _
Public Class ApplicationCollection _
Implements IEnumerable
'Usage
Dim instance As Application.ApplicationCollection
[SingleSignonPermissionAttribute(SecurityAction.Demand, Access = SingleSignonAccess.Minimal)]
public class ApplicationCollection : IEnumerable
Remarks
All users can use this class.
Examples
The following code example shows the use of the Application.ApplicationCollection class.
using System;
using Microsoft.SharePoint.Portal.SingleSignon;
namespace SSOSampleCode
{
/// <summary>
/// Sample code for SharePoint Portal Single SignOn.
/// </summary>
class CMainEntry
{
[STAThread]
static void Main(string[] args)
{
try
{
Application.ApplicationCollection AppColl = new Application.ApplicationCollection();
Console.WriteLine("Applications:");
//Display collection items.
foreach (Application.ApplicationInfo App in AppColl)
{
Console.WriteLine("Application: " + App.ApplicationFriendlyName);
Application.ApplicationFieldCollection AppFieldColl = new Application.ApplicationFieldCollection(App.ApplicationName);
Console.WriteLine("Application Fields:");
foreach (Application.ApplicationField Field in AppFieldColl)
{
Console.WriteLine(" Field: " + Field.Field + " Masked: " + Field.Mask.ToString());
}
}
}
catch (SingleSignonException esso)
{
Console.WriteLine("SingleSignonException caught.");
Console.WriteLine("Exception Code: " + "0x" + esso.LastErrorCode.ToString("x"));
Console.WriteLine("Source: " + esso.Source);
Console.WriteLine("StackTrace: " + esso.StackTrace);
Console.WriteLine("MethodName: " + esso.TargetSite.Name);
Console.WriteLine("Message: " + esso.Message);
}
catch (Exception e)
{
Console.WriteLine("Exception caught.");
Console.WriteLine("Source: " + e.Source);
Console.WriteLine("StackTrace: " + e.StackTrace);
Console.WriteLine("MethodName: " + e.TargetSite.Name);
Console.WriteLine("Message: " + e.Message);
}
}
}
}
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.