/// <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; }
/// <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, ReadOnlyBondMarketConventions marketConventions, BondMarketConventions 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.CouponFrequencyState != ConventionState.UserInput)) //{ // logger.Add_Info_StandardValue("Coupon frequency", marketConventions.CouponFrequency.Name); //} } }