Touchstone 11.0 API Reference
GetAirEvents Method
Example 


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

AIR Events can be historical event simulations, or they can be stochastic Realistic Disaster Scenarios (RDS). Historical event simulations use the parameters of actual events, such as tropical cyclone wind speed, earthquake fault zone, peak ground acceleration, soil type, distance to 100 year flood plain, and so on. RDS are from AIR's stochastic catalogs. They are based on Lloyd's® RDS.

Syntax
Public Function GetAirEvents( _
   ByVal request As GetAIREventsRequest _
) As GetAIREventsResponse
Dim instance As ExposureConcentrationAnalysisServiceClient
Dim request As GetAIREventsRequest
Dim value As GetAIREventsResponse
 
value = instance.GetAirEvents(request)

Parameters

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

Return Value

A GetAIREventsResponse containing a list of AIR Events in the specified SQL Server Instance, as well as information describing the actual paging layout of the returned list of AIR Events.
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 AIR Events in a given SQL Server Instance using the GetAIREvents() method:
using System;
using AIR.Services.AnalysisCommon.Data;
using AIR.Services.Common.Data;
using AIR.Services.ExposureConcentrationAnalysis.Api;
            
class SnippetGetAIREventsRequest
{
    private static void GetAIREvents(int businessUnitSid, int sqlInstanceSid)
    {
        ExposureConcentrationAnalysisServiceClient ecaClient = new ExposureConcentrationAnalysisServiceClient();
        GetAIREventsRequest eventsRequest = new GetAIREventsRequest();
        eventsRequest.BusinessUnitSid = businessUnitSid;
        eventsRequest.SqlInstanceSid = sqlInstanceSid;
            
        /// Implement logic to loop through all the records.
        int page = 1; int pageSize = 20;
        eventsRequest.PagingInfo = new PagingInfo { PageNumber = page, PageSize = pageSize };
    
        GetAIREventsResponse eventsResponse = ecaClient.GetAirEvents(eventsRequest);
            
        if (eventsResponse.Status.Code == StatusCode.Success)
        {
            foreach (AIREvent airEvent in eventsResponse.AIREvents)
            {
                Console.WriteLine("------------------  AIR Event Sid: " + airEvent.Sid + "  -----------------------");
                Console.WriteLine("Name: " + airEvent.Name);
                Console.WriteLine("Event Scale: " + airEvent.EventScale);
                Console.WriteLine("Region: " + airEvent.Region);
                Console.WriteLine("Date Created: " + airEvent.CreatedDate);
                Console.WriteLine("Upload Date: " + airEvent.UploadedDate);
                Console.WriteLine("Event Year: " + airEvent.EventYear);
                Console.WriteLine("Insurable Loss: " + airEvent.InsurableLoss); ;
            }
        }
    }
}
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