public static void Question3Solution() { List <Product> products = new List <Product>(); Random random = new Random(); for (int i = 0; i < 100; i++) { products.Add(new Product() { Id = Guid.NewGuid(), Price = random.NextDouble() * random.Next(1, 100) }); } ILocalizationInfo us = new Us(); ILocalizationInfo ca = new Canada(); ICartTotal cart = new CartTotal(); Console.WriteLine("US: " + cart.Calculate(products, us)); Console.WriteLine("CA: " + cart.Calculate(products, ca)); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Canada obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public Canada(Canada.Market m) : this(NQuantLibcPINVOKE.new_Canada__SWIG_0((int)m), true) { if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve(); }
public static int GetMarketId(this Canada value) { return((int)value); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Canada obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }