Exemplo n.º 1
0
 public RootModel(
     TargetingType targetingType,
     BroadGlobalActivePortfolio portfolio,
     TargetingTypeBasketBaseValueChangesetInfo latestTtbbvChangesetInfo,
     TargetingTypeBasketPortfolioTargetChangesetInfo latestTtbptChangesetInfo,
     BgaPortfolioSecurityFactorChangesetInfo latestPstoChangesetInfo,
     BuPortfolioSecurityTargetChangesetInfo latestPstChangesetInfo,
     GlobeModel globe,
     CashModel cash,
     Overlaying.RootModel factors,
     IExpression <Decimal?> portfolioScaledGrandTotalExpression,
     IExpression <Decimal?> trueExposureGrandTotal,
     IExpression <Decimal?> trueActiveGrandTotal,
     DateTime benchmarkDate,
     Boolean isUserPermittedToSave
     )
 {
     this.TargetingType        = targetingType;
     this.Portfolio            = portfolio;
     this.LatestTtbbvChangeset = latestTtbbvChangesetInfo;
     this.LatestTtbptChangeset = latestTtbptChangesetInfo;
     this.LatestPstoChangeset  = latestPstoChangesetInfo;
     this.LatestPstChangeset   = latestPstChangesetInfo;
     this.Globe   = globe;
     this.Cash    = cash;
     this.Factors = factors;
     this.PortfolioScaledGrandTotal = portfolioScaledGrandTotalExpression;
     this.TrueExposureGrandTotal    = trueExposureGrandTotal;
     this.TrueActiveGrandTotal      = trueActiveGrandTotal;
     this.BenchmarkDate             = benchmarkDate;
     this.IsUserPermittedToSave     = isUserPermittedToSave;
 }
Exemplo n.º 2
0
 public Changeset(TargetingTypeBasketPortfolioTargetChangesetInfo latestChangesetInfo, Int32 targetingTypeId, String portfolioId, String username, IEnumerable <IChange> changes)
 {
     this.LatestChangesetSnapshot = latestChangesetInfo;
     this.TargetingTypeId         = targetingTypeId;
     this.PortfolioId             = portfolioId;
     this.Username = username;
     this.Changes  = changes.ToList();
 }
Exemplo n.º 3
0
        protected override void ApplyChangeset(Changeset changeset, Int32 changesetId, Int32 computationId, IDataManager manager)
        {
            var changesetInfo = new TargetingTypeBasketPortfolioTargetChangesetInfo(
                changesetId,
                changeset.Username,
                DateTime.Now, // <---- is going to be ignored
                computationId
                );

            manager.InsertTargetingTypeBasketPortfolioTargetChangeset(changesetInfo);
        }
        protected TargetingTypeBasketPortfolioTargetChangesetInfo DeserializeTargetingTypeBasketPortfolioTargetChangeset(JsonReader reader)
        {
            var result = new TargetingTypeBasketPortfolioTargetChangesetInfo(
                reader.ReadAsInt32(JsonNames.Id),
                reader.ReadAsString(JsonNames.Username),
                reader.ReadAsDatetime(JsonNames.Timestamp),
                reader.ReadAsInt32(JsonNames.CalcualtionId)
                );

            return(result);
        }
Exemplo n.º 5
0
        protected TargetingTypeBasketPortfolioTargetChangesetInfo DeserializeTargetingTypeBasketPortfolioTargetChangesetInfo(ChangesetModel model)
        {
            var result = new TargetingTypeBasketPortfolioTargetChangesetInfo(model.Id, model.Username, model.Timestamp, model.CalculationId);

            return(result);
        }
 public void Resolve(TargetingTypeBasketPortfolioTargetChangesetInfo changesetInfo)
 {
     this.Result = "Targeting-type/Basket/Broad-global-active-portfolio target";
 }
Exemplo n.º 7
0
 protected void SerializeTargetingTypeBasketPortfolioTargetChangeset(
     TargetingTypeBasketPortfolioTargetChangesetInfo changesetInfo, IJsonWriter writer)
 {
     this.SerializeChangeset(changesetInfo, writer);
 }