private ExposureDataAdaptor GetTreatyExposureData(ContractExposure contractExposure) { ExposureDataAdaptor treatyAdaptor = new ExposureDataAdaptor(contractExposure, NGFM_API); treatyAdaptor.ExtractPositionData(); foreach (long conID in treatyAdaptor.Positions.GetDependentContracts()) { ExposureDataAdaptor childContractData = GetExposureAdaptor(conID); treatyAdaptor.CombineExposure(childContractData); } return(treatyAdaptor); }
public ExposureDataAdaptor GetExposureAdaptor(long conID) { ExposureDataAdaptor exposure; if (!expData.TryGetValue(conID, out exposure)) { ContractExposure contractExposure = GetExposure(conID); if (contractExposure.ContractType.IsReinsuranceContract()) { exposure = GetTreatyExposureData(contractExposure); } else { exposure = new ExposureDataAdaptor(contractExposure, NGFM_API); exposure.GetPrimaryData(); } expData.Add(conID, exposure); } return(exposure); }
public void CombineExposure(ExposureDataAdaptor otherExposure) { this._characteristics.UnionWith(otherExposure.Characteristics); this._rites.UnionWith(otherExposure.ContractRITES); this._schedules.UnionWith(otherExposure.Schedules); }