Touchstone 11.0 API Reference
GetExposureSets Method (DataSourceManagementServiceClient)
Example 


Air.Services.Proxy Assembly > (Global) Namespace > DataSourceManagementServiceClient Class : GetExposureSets Method
Contains a GetExposureSetsRequest that identifies the Touchstone-generated Data Source Sequential Identifier (SID), Business Unit SID, and SQL Instance SID, associated with the list of Exposure Sets that you want to retrieve.
Retrieves a list of all existing Touchstone® Exposure Sets in a given Data Source within a specific Business Unit and SQL Server Instance.
Syntax
Public Function GetExposureSets( _
   ByVal request As GetExposureSetsRequest _
) As GetExposureSetsResponse
Dim instance As DataSourceManagementServiceClient
Dim request As GetExposureSetsRequest
Dim value As GetExposureSetsResponse
 
value = instance.GetExposureSets(request)

Parameters

request
Contains a GetExposureSetsRequest that identifies the Touchstone-generated Data Source Sequential Identifier (SID), Business Unit SID, and SQL Instance SID, associated with the list of Exposure Sets that you want to retrieve.

Return Value

A GetExposureSetsResponse containing a list of Exposure Sets in the specified Data Source within the specified SQL Server Instance and Business Unit.
Remarks
To find the Business Unit SID to pass into this method, call the GetBusinessUnits() method.

To find the SQL Instance SID to pass into this method, call the GetSqlInstances() method.

To find the Data Source SID to pass into this method, call the GetDataSources() method.

Example
The following example shows how to retrieve a list of all Touchstone Exposure Sets in a given Data Source within a specific Business Unit and SQL Server Instance using the GetExposureSets() method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.Common.Exposure.Data;
using AIR.Services.DataSourceManagement.Api;
            
class SnippetGetExposureSetsRequest
{
    private static void GetExposureSets(int businessUnitSid, int sqlInstanceSid, int dataSourceSid)
    {
        DataSourceManagementServiceClient dsClient = new DataSourceManagementServiceClient();
        GetExposureSetsRequest request = new GetExposureSetsRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.DataSourceSid = dataSourceSid;
        GetExposureSetsResponse response = dsClient.GetExposureSets(request);
        if (response.Status.Code == StatusCode.Success)
        {
            foreach (ExposureSet exposureSet in response.ExposureSets)
            {
                Console.WriteLine("SID: " + exposureSet.Sid);
                Console.WriteLine("Name: " + exposureSet.Name);
            }
        }
    }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DataSourceManagementServiceClient Class
DataSourceManagementServiceClient Members