/// <summary>Adds default market conventions that are taken into account into a specific logger.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="marketConventions">The market conventions which are taken into account.</param>
 /// <param name="userMarketConventionInput">The user input of market conventions.</param>
 public static void Add_Info(this ILogger logger, ReadOnlyMoneyMarketConventions marketConventions, MoneyMarketConventions userMarketConventionInput = null)
 {
     if ((logger != null) && (marketConventions != null))
     {
         //if ((userMarketConventionInput == null) || (userMarketConventionInput.BusinessDayConventionState != ConventionState.UserInput))
         //{
         //    logger.Add_Info_StandardValue("Business day convention", marketConventions.BusinessDayConvention.Name);
         //}
         //if ((userMarketConventionInput == null) || (userMarketConventionInput.BusinessDaysToSettleState != ConventionState.UserInput))
         //{
         //    logger.Add_Info_StandardValue("Business days to settle", marketConventions.BusinessDaysToSettle);
         //}
         //if ((userMarketConventionInput == null) || (userMarketConventionInput.DayCountConventionState != ConventionState.UserInput))
         //{
         //    logger.Add_Info_StandardValue("Day count convention", marketConventions.DayCountConvention.Name);
         //}
         //if ((userMarketConventionInput == null) || (userMarketConventionInput.CapletTenorConventionState != ConventionState.UserInput))
         //{
         //    logger.Add_Info_StandardValue("Caplet tenor convention", marketConventions.CapletTenorConvention.Name);
         //}
         //if ((userMarketConventionInput == null) || (userMarketConventionInput.FutureBasePointValueState != ConventionState.UserInput))
         //{
         //    logger.Add_Info_StandardValue("Future base point value", marketConventions.FutureBasePointValue);
         //}
         //if ((userMarketConventionInput == null) || (userMarketConventionInput.LiborRateRoundingRuleState != ConventionState.UserInput))
         //{
         //    logger.Add_Info_StandardValue("Libor Rounding Rule", marketConventions.LiborRateRoundingRule.Name);
         //}
         //if ((userMarketConventionInput == null) || (userMarketConventionInput.FixingLagState != ConventionState.UserInput))
         //{
         //    logger.Add_Info_StandardValue("Fixing Lag", marketConventions.FixingLag.Name);
         //}
     }
 }
Example #2
0
        /// <summary>Initializes a new instance of the <see cref="ReadOnlyMarketConventions"/> class.
        /// </summary>
        /// <param name="bondMarketConventions">The bond market conventions.</param>
        /// <param name="creditMarketConventions">The credit market conventions.</param>
        /// <param name="inflationMarketConventions">The inflation market conventions.</param>
        /// <param name="moneyMarketConventions">The money market conventions.</param>
        /// <param name="swapMarketConventions">The swap market conventions.</param>
        /// <exception cref="ArgumentNullException">Thrown, if one of the arguments is <c>null</c>.</exception>
        public ReadOnlyMarketConventions(ReadOnlyBondMarketConventions bondMarketConventions, ReadOnlyCreditMarketConventions creditMarketConventions, ReadOnlyInflationMarketConventions inflationMarketConventions, ReadOnlyMoneyMarketConventions moneyMarketConventions, ReadOnlySwapMarketConventions swapMarketConventions)
        {
            if (bondMarketConventions == null)
            {
                throw new ArgumentNullException("bondMarketConventions");
            }
            BondMarketConventions = bondMarketConventions;

            if (creditMarketConventions == null)
            {
                throw new ArgumentNullException("creditMarketConventions");
            }
            CreditMarketConventions = creditMarketConventions;

            if (inflationMarketConventions == null)
            {
                throw new ArgumentNullException("inflationMarketConventions");
            }
            InflationMarketConventions = inflationMarketConventions;

            if (moneyMarketConventions == null)
            {
                throw new ArgumentNullException("moneyMarketConventions");
            }
            MoneyMarketConventions = moneyMarketConventions;

            if (swapMarketConventions == null)
            {
                throw new ArgumentNullException("swapMarketConventions");
            }
            SwapMarketConventions = swapMarketConventions;
        }