/// <summary>Sets the standard conventions of a specific <see cref="ReadOnlyInflationMarketConventions.InflationSwapConventions"/> object.
 /// </summary>
 /// <param name="swapMarketConventions">The Swap Market conventions.</param>
 internal void SetStandardValue(ReadOnlyInflationMarketConventions.InflationSwapConventions swapMarketConventions)
 {
     if (swapMarketConventions == null)
     {
         throw new ArgumentNullException("swapMarketConventions");
     }
     SetStandardBusinessDaysToSettle(swapMarketConventions.BusinessDaysToSettle);
     SetStandardFixedBusinessDayConvention(swapMarketConventions.FixedBusinessDayConvention);
     SetStandardFixedDayCountConvention(swapMarketConventions.FixedDayCountConvention);
     SetStandardFixedFrequency(swapMarketConventions.FixedFrequency);
     SetStandardFloatingBusinessDayConvention(swapMarketConventions.FloatingBusinessDayConvention);
     SetStandardFloatingDayCountConvention(swapMarketConventions.FloatingDayCountConvention);
     SetStandardFloatingFrequency(swapMarketConventions.FloatingFrequency);
 }
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();
 }