protected Core.ManagingBpt.OtherModel DeserializeOther(OtherModel model, Core.ManagingBpt.Computations computations) { var basketCountries = model.BasketCountries.Select(x => this.DeserializeBasketCountry(x, computations)).ToList(); var unsavedBasketCountries = model.UnsavedBasketCountries.Select(x => this.DeserializeUnsavedBasketCountry(x, computations)).ToList(); var result = this.modelBuilder.CreateOtherModel( basketCountries, unsavedBasketCountries ); return(result); }
protected OtherModel SerializeOtherRegion(Core.ManagingBpt.OtherModel model, CalculationTicket ticket) { var result = new OtherModel( this.serializer.SerializeNullableExpression(model.Base, ticket), this.serializer.SerializeNullableExpression(model.BaseActive, ticket), model.BasketCountries.Select(x => this.SerializeBasketCountry(x, ticket)).ToArray(), this.serializer.SerializeExpression(model.Benchmark, ticket), this.serializer.SerializeExpression(model.Overlay, ticket), this.serializer.SerializeNullableExpression(model.PortfolioAdjustment, ticket), this.serializer.SerializeNullableExpression(model.PortfolioScaled, ticket), this.serializer.SerializeNullableExpression(model.TrueActive, ticket), this.serializer.SerializeNullableExpression(model.TrueExposure, ticket), model.UnsavedBasketCountries.Select(x => this.SerializeUnsavedBasketCountry(x, ticket)).ToArray() ); return(result); }
public void Resolve(OtherModel model) { throw new InvalidOperationException(); }
public void Resolve(OtherModel model) { this.Result = this.deserializer.DeserializeOther(model, this.computations); }