Exemplo n.º 1
0
 private bool Equals(CmtResultKey other)
 {
     return mTerm.Equals(other.mTerm) && mMaturity.Equals(other.mMaturity) && string.Equals(mId, other.mId);
 }
Exemplo n.º 2
0
        public void UpdateResults(IEnumerable<IValuationResult> results)
        {
            foreach (var valuationResult in results)
            {
                if(string.IsNullOrEmpty(valuationResult.Identifier) 
                    || valuationResult.Results == null 
                    || !valuationResult.Results.ContainsKey("Term")) continue;

                try
                {
                    var maturity = (DateTime)mCarbonClient.GetCarbonBondStatic(valuationResult.Identifier, "maturityDt");

                    var key = new CmtResultKey(valuationResult.Results["Term"], maturity, valuationResult.Identifier);

                    mValuationResults[key] = ConvertValuationResultToTable(valuationResult, maturity);
                }
                catch (Exception e)
                {
                    SLog.log.ErrorFormat("Error when processing result {0} : {1}", valuationResult.Identifier, e);
                }
            }    
        }