protected void RecalculateBasketCountry( BasketCountryModel model, TargetingType targetingType, BroadGlobalActivePortfolio portfolio, ICollection <BgaPortfolioSecurityTargetInfo> result, IDataManager manager, CalculationTicket ticket ) { var baseValue = model.Base.Value(ticket); if (!baseValue.HasValue) { throw new ValidationException(new ErrorIssue("There is no base value defined for the \"" + model.Basket.Country.Name + "\" country (ISO: " + model.Basket.Country.IsoCode + ").")); } var portfolioScaledValue = model.PortfolioScaled.Value(ticket); if (!portfolioScaledValue.HasValue) { throw new ValidationException(new ErrorIssue("There is no portfolio scaled value defined for the \"" + model.Basket.Country.Name + "\" country (ISO: " + model.Basket.Country.IsoCode + ").")); } this.RecalculateSecurityTargets( portfolioScaledValue.Value, model.Basket, targetingType, portfolio, result, manager, ticket ); }
public Decimal Populate(BasketCountryModel basketCountry, BenchmarkValueResolver valueResolver) { var value = valueResolver.GetBenchmark(basketCountry.Country.IsoCode.Value); basketCountry.Benchmark = value; return(value); }
public void Resolve(BasketCountryModel model) { this.Result = CalculateRescaledBase( model.Base.EditedValue, model.PortfolioAdjustment.EditedValue, this.baseWherePortfoioAdjustmentSetTotal, this.porfolioAdjustmentTotal, tracer ); }
public void Resolve(BasketCountryModel model) { this.hopper.RecalculateBasketCountry( model, this.targetingType, this.portfolio, this.result, this.manager, this.ticket ); }
public void Resolve(BasketCountryModel model) { model.Base.RegisterForBeingWatched(this.watcher, null); model.PortfolioAdjustment.RegisterForBeingWatched(this.watcher, null); }
public void Resolve(BasketCountryModel model) { this.Result = this.populator.Populate(model, this.valueResolver); }
public void Resolve(BasketCountryModel model) { model.Base.InitialValue = this.valueResolver.GetBaseValue(model.Basket.Id); }
public IChange TryTransformToChange(BasketCountryModel model) { var result = this.TransformToChange(model.Basket.Id, model.Base); return(result); }
public void Resolve(BasketCountryModel model) { this.ResultOpt = this.transformer.TryTransformToChange(model); }
public void Resolve(BasketCountryModel model) { // do nothing }
protected IChange TryTransformToChange(BasketCountryModel model) { return(this.TryTransformToChange(model.Basket.Id, model.PortfolioAdjustment)); }
public void Resolve(BasketCountryModel model) { this.traverser.TraverseBasketCountry(model, this.result); }
protected void TraverseBasketCountry(BasketCountryModel model, ICollection <IGlobeResident> result) { result.Add(model); }
public void Resolve(BasketCountryModel model) { this.Result = this.parent.BasketCountryTemplate; }
public void Resolve(BasketCountryModel model) { this.Result = model.PortfolioAdjustment.EditedValue.HasValue ? model.Base.EditedValue : null; }