/// <summary>Sets the standard conventions of a specific <see cref="ReadOnlyInflationMarketConventions.InflationBondConventions"/> object.
 /// </summary>
 /// <param name="bondMarketConventions">The bond market conventions.</param>
 internal void SetStandardValues(ReadOnlyInflationMarketConventions.InflationBondConventions bondMarketConventions)
 {
     if (bondMarketConventions == null)
     {
         throw new ArgumentNullException("bondMarketConventions");
     }
     SetStandardDayCountconvention(bondMarketConventions.DayCountConvention);
     SetStandardBusinessDayConvention(bondMarketConventions.BusinessDayConvention);
     SetStandardCouponFrequency(bondMarketConventions.CouponFrequency);
 }
Ejemplo n.º 2
0
 /// <summary>Initializes a new instance of the <see cref="ReadOnlyInflationMarketConventions"/> class.
 /// </summary>
 /// <param name="inflationMarketConventions">The inflation market conventions.</param>
 /// <exception cref="ArgumentNullException">Thrown, if <paramref name="inflationMarketConventions"/> is <c>null</c>.</exception>
 /// <exception cref="ArgumentException">Thrown, if <paramref name="inflationMarketConventions"/> is not completely defined.</exception>
 public ReadOnlyInflationMarketConventions(InflationMarketConventions inflationMarketConventions)
 {
     if (inflationMarketConventions == null)
     {
         throw new ArgumentNullException("inflationMarketConventions");
     }
     if (inflationMarketConventions.IsCompletelyDefined == false)
     {
         throw new ArgumentException(String.Format(ExceptionMessages.ArgumentIsNotWellDefined, "Inflation market conventions"), "inflationMarketConventions");
     }
     RoundingRule = inflationMarketConventions.RoundingRule;
     SwapMarket   = inflationMarketConventions.SwapMarket.AsReadOnly();
     BondMarket   = inflationMarketConventions.BondMarket.AsReadOnly();
 }