/// <summary>Gets a mutable Inflation Market convention template which is initially filled with values of /// the current instance, i.e. with some standard conventions. /// </summary> /// <returns>A mutable Inflation Market convention template.</returns> public InflationMarketConventions GetMutableTemplate() { InflationMarketConventions marketConventions = new InflationMarketConventions(); marketConventions.SetStandardRoundingRule(RoundingRule); marketConventions.BondMarket.SetStandardValues(BondMarket); marketConventions.SwapMarket.SetStandardValue(SwapMarket); return(marketConventions); }
/// <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(); }