///<summary> ///</summary> ///<param name="name"></param> ///<param name="pricingStructure"></param> public void AddPricingStructure(string name, IPricingStructure pricingStructure) { if (pricingStructure != null) { if (PricingStructures.ContainsKey(name)) { PricingStructures.Remove(name); } PricingStructures.Add(name, pricingStructure); } }
///<summary> /// A simple market environment can only contain a maximum of 1 pricingStructure: /// </summary> ///<param name="marketId">The marketId</param> ///<param name="uniqueIdentifier">The uniqueIdentifier</param> ///<param name="pricingStructure">The pricingStructure</param> public SimpleMarketEnvironment(string marketId, string uniqueIdentifier, IPricingStructure pricingStructure) : base(marketId) { PricingStructureIdentifier = uniqueIdentifier; PricingStructures.Add(PricingStructureIdentifier, pricingStructure); }