Esempio n. 1
0
        protected FactorItemModel SerializeFactorItem(Core.Overlaying.ItemModel item)
        {
            var result = new FactorItemModel(
                this.serializer.SerializeBottomUpPortfolio(item.BottomUpPortfolio),
                this.serializer.SerializeEditableExpression(item.OverlayFactor)
                );

            return(result);
        }
Esempio n. 2
0
        protected Core.Overlaying.ItemModel DeserializeOverlayFactorsItem(FactorItemModel model)
        {
            var bottomUpPortfolio       = this.deserializer.DeserializeBottomUpPortfolio(model.BottomUpPortfolio);
            var overlayFactorExpression = this.modelBuilder.OverlayModelBuilder.CreateOverlayFactorExpression(bottomUpPortfolio.Name);

            this.deserializer.PopulateEditableExpression(overlayFactorExpression, model.OverlayFactor);
            var result = new Core.Overlaying.ItemModel(bottomUpPortfolio, overlayFactorExpression);

            return(result);
        }