Touchstone 11.0 API Reference
GetLossAnalysisAnnualResults Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > LossAnalysisServiceClient Class : GetLossAnalysisAnnualResults Method
Contains a GetLossAnalysisAnnualResultsRequest that identifies the Touchstone-generated Analysis Sequential Identifier (SID) of the analysis for which you want to view Loss Analysis Annual Results, along with the desired type of coverage, perils, type of annual loss, and type of Financial Perspective to include in the Loss Analysis Annual Results, as well as the associated Business Unit SID and SQL Instance SID.
Retrieves Touchstone® Loss Analysis Annual Results for a given Detailed Loss Analysis.

Loss Analysis Annual Results are the EP distribution per year for a specified Detailed Loss Analysis instance. The data that the GetLossAnalysisAnnualResults() method returns includes the following:

Syntax
Public Function GetLossAnalysisAnnualResults( _
   ByVal request As GetLossAnalysisAnnualResultsRequest _
) As GetLossAnalysisAnnualResultsResponse
Dim instance As LossAnalysisServiceClient
Dim request As GetLossAnalysisAnnualResultsRequest
Dim value As GetLossAnalysisAnnualResultsResponse
 
value = instance.GetLossAnalysisAnnualResults(request)

Parameters

request
Contains a GetLossAnalysisAnnualResultsRequest that identifies the Touchstone-generated Analysis Sequential Identifier (SID) of the analysis for which you want to view Loss Analysis Annual Results, along with the desired type of coverage, perils, type of annual loss, and type of Financial Perspective to include in the Loss Analysis Annual Results, as well as the associated Business Unit SID and SQL Instance SID.

Return Value

A GetLossAnalysisAnnualResultsResponse containing the Loss Analysis Annual Results that you have requested, including the annual EP distribution.
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 Analysis SID to pass into this method, call the GetDetailedLossAnalyses() method.

Example
The following example shows how to retrieve Touchstone Loss Analysis Annual Results using the GetLossAnalysisAnnualResults() method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.LossAnalysis.Api;
using AIR.Services.LossAnalysis.Data;
            
class SnippetGetLossAnalysisAnnualResultsRequest
{
    private static void GetLossAnalysisAnnualResults(int businessUnitSid, int sqlInstanceSid, int analysisSid)
    {
        LossAnalysisServiceClient client = new LossAnalysisServiceClient();
        GetLossAnalysisAnnualResultsRequest request = new GetLossAnalysisAnnualResultsRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.AnalysisSid = analysisSid;
        request.AnnualTypeFilter = LossAnnualType.Aggregate;
        request.PerspectiveFilter = FinancialPerspectives.GroundUp;
        GetLossAnalysisAnnualResultsResponse response = client.GetLossAnalysisAnnualResults(request);
        if (response.Status.Code == StatusCode.Success)
        {
            Console.WriteLine("Displaying first 10 data points");
            for (int i=0; i < 10; i++)
            {
                AnnualEPData dataPoint = response.Results[0].DataPoints[i];
                Console.WriteLine("YearId: " + dataPoint.YearId.ToString());
                Console.WriteLine("LossSD: " + Math.Round(dataPoint.LossSD));
                Console.WriteLine("MeanLoss: " + Math.Round(dataPoint.MeanLoss));
                Console.WriteLine("MaxLoss: " + Math.Round(dataPoint.MaxLoss));
            }
        }
    }
}
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