Touchstone 11.0 API Reference
GetZoneSets Method (ExposureConcentrationAnalysisServiceClient)
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ExposureConcentrationAnalysisServiceClient Class : GetZoneSets Method
Contains a GetZoneSetsRequest that identifies the Touchstone-generated Business Unit Sequential Identifier (SID), SQL Instance SID, and optional Paging Info associated with the list of Zone Sets that you want to retrieve.
Retrieves a list of all existing Touchstone® Zone Sets for a given Business Unit and SQL Server Instance.

A Zone Set is a grouping of geographic zones.

These zone sets differ from the zone sets used for detailed loss analyses.

Syntax
Public Function GetZoneSets( _
   ByVal request As GetZoneSetsRequest _
) As GetZoneSetsResponse
Dim instance As ExposureConcentrationAnalysisServiceClient
Dim request As GetZoneSetsRequest
Dim value As GetZoneSetsResponse
 
value = instance.GetZoneSets(request)

Parameters

request
Contains a GetZoneSetsRequest that identifies the Touchstone-generated Business Unit Sequential Identifier (SID), SQL Instance SID, and optional Paging Info associated with the list of Zone Sets that you want to retrieve.

Return Value

A GetZoneSetsResponse containing a list of Zone Sets in the specified SQL Server Instance in the specified 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.

Example
The following example shows how to retrieve a list of all Touchstone Zone Sets for a given Business Unit and SQL Server Instance using the GetZoneSets() method:
using System;
using System.Collections.Generic;
using AIR.Services.Common.Data;
using AIR.Services.ExposureConcentrationAnalysis.Data;
using AIR.Services.ExposureConcentrationAnalysis.ZoneManagement.Api;
            
class SnippetGetZoneSetsRequest
{
    private static void GetZoneSets(int businessUnitSid, int sqlInstanceSid)
    {
        ExposureConcentrationAnalysisServiceClient ecaClient = new ExposureConcentrationAnalysisServiceClient();
       
        List<int> zoneSets = new List<int> { };
        GetZoneSetsRequest zoneSetsRequest = new GetZoneSetsRequest();
        zoneSetsRequest.BusinessUnitSid = businessUnitSid;
        zoneSetsRequest.SqlInstanceSid = sqlInstanceSid;
            
        /// Implement logic to loop through all the records.
        int page = 1; int pageSize = 20;
        zoneSetsRequest.PagingInfo = new PagingInfo { PageNumber = page, PageSize = pageSize };
    
        GetZoneSetsResponse zoneSetsResponse = ecaClient.GetZoneSets(zoneSetsRequest);
            
        if (zoneSetsResponse.Status.Code == StatusCode.Success)
        {
            foreach (ZoneSet zoneSet in zoneSetsResponse.ZoneSets)
            {
                Console.WriteLine("Zone Set SID: " + zoneSet.Sid);
                Console.WriteLine("Name: " + zoneSet.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

ExposureConcentrationAnalysisServiceClient Class
ExposureConcentrationAnalysisServiceClient Members