private static Instrument createinstrument(int id, string name, decimal px, string localiso, CurrencyInfo reportingCurrencyInfo, FXCollection fxs) { CurrencyInfo localcurrencyinfo = CurrencyInfoCollection.GetCurrencyInfo(localiso); FX fx = fxs.GetFX(reportingCurrencyInfo, localcurrencyinfo); Price price = new Price(px, localcurrencyinfo); Instrument instrument = new Instrument(id, name, DateTime.Now.Date, DateTime.Now.Date, fx, reportingCurrencyInfo, price); return(instrument); }
//private int v1; //private string v2; //public Instrument(decimal localValue, string localiso, decimal reportingValue, string reportingiso, FX pricefx ) //{ //ReportingPrice = new FinancialTypes.Price(reportingValue, reportingiso); //LocalPrice = new Price(localValue, localiso); //} //public Instrument(decimal value, string iso) : this(value, iso, value, iso) //{ } public Instrument(int id, string name, DateTime valuationDate, DateTime valuationDateProxy, FX priceFX, CurrencyInfo reportingCurrency, Price localPrice) { ID = id; Name = name; ValuationDate = valuationDate; ValuationDateProxy = valuationDateProxy; LocalPrice = localPrice; PriceFX = priceFX; ReportingCurrency = reportingCurrency; }