Touchstone 11.0 API Reference
GetEventSets Method (LossAnalysisServiceClient)
Example 


Air.Services.Proxy Assembly > (Global) Namespace > LossAnalysisServiceClient Class : GetEventSets Method
Contains a GetEventSetsRequest that identifies the Touchstone-generated Business Unit Sequential Identifier (SID) and SQL Instance SID associated with the list of Event Sets that you want to retrieve.
Retrieves a list of all existing Touchstone® Event Sets for a given Business Unit and SQL Server Instance.

An Event Set is a data file of stochastic or historical occurrences of a particular peril or combination of perils in a particular geographic region. You can use Event Sets to perform Detailed Loss Analyses. There are three types of Event Sets, as follows:

Event Set Type Description
Stochastic Simulated events spanning 10K, 50K, 100K, or 500K years that AIR generates from catastrophe models and extrapolation of actual historical data
Historical Actual historical events; used to estimate losses to your Exposure portfolio assuming the actual event recurred today
Realistic Disaster Scenario (RDS) Events similar to the RDS created by Lloyd's of London; used to test how the market as a whole accumulates loss in RDS scenarios
Syntax
Public Function GetEventSets( _
   ByVal request As GetEventSetsRequest _
) As GetEventSetsResponse
Dim instance As LossAnalysisServiceClient
Dim request As GetEventSetsRequest
Dim value As GetEventSetsResponse
 
value = instance.GetEventSets(request)

Parameters

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

Return Value

A GetEventSetsResponse containing a list of Event 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 Event Sets for a given Business Unit and SQL Server Instance using the GetEventSets() method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.LossAnalysis.Api;
using AIR.Services.LossAnalysis.Data;
            
class SnippetGetEventSetsRequest
{
    private static void GetEventSets(int businessUnitSid, int sqlInstanceSid)
    {
        LossAnalysisServiceClient lossClient = new LossAnalysisServiceClient();
        GetEventSetsRequest request = new GetEventSetsRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        GetEventSetsResponse response = lossClient.GetEventSets(request);
        if (response.Status.Code == StatusCode.Success)
        {
            foreach (EventSet es in response.EventSets)
            {
                Console.WriteLine("SID: " + es.Sid);
                Console.WriteLine("Name: " + es.Name);
                Console.WriteLine("Standard Name: " + es.StandardName);
                Console.WriteLine("Max Year: " + es.MaximumYear);
                Console.WriteLine("Peril Set Code: " + es.PerilSetCode);
                Console.WriteLine("Type: " + es.Type.ToString());
            }
        }
    }
}
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

LossAnalysisServiceClient Class
LossAnalysisServiceClient Members