Beispiel #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;
 }
        protected BgaPortfolioSecurityFactorChangesetInfo DeserializePortfolioSecurityTargetOverlayChangeset(JsonReader reader)
        {
            var result = new BgaPortfolioSecurityFactorChangesetInfo(
                reader.ReadAsInt32(JsonNames.Id),
                reader.ReadAsString(JsonNames.Username),
                reader.ReadAsDatetime(JsonNames.Timestamp),
                reader.ReadAsInt32(JsonNames.CalcualtionId)
                );

            return(result);
        }
Beispiel #3
0
        protected override void ApplyChangeset(Changeset changeset, Int32 changesetId, Int32 computationId, IDataManager manager)
        {
            var changesetInfo = new BgaPortfolioSecurityFactorChangesetInfo(
                changesetId,
                changeset.Username,
                DateTime.Now, //  <---- isn't going to be used
                computationId
                );

            manager.InsertBgaPortfolioSecurityFactorChangeset(changesetInfo);
        }
Beispiel #4
0
 public Changeset(
     String portfolioId,
     BgaPortfolioSecurityFactorChangesetInfo latestChangesetInfo,
     String username,
     IEnumerable <IChange> changes
     )
 {
     this.PortfolioId             = portfolioId;
     this.LatestChangesetSnapshot = latestChangesetInfo;
     this.Username = username;
     this.Changes  = changes.ToList();
 }
Beispiel #5
0
        protected BgaPortfolioSecurityFactorChangesetInfo DeserializeBgaPortfolioSecurityFactorChangesetInfo(ChangesetModel model)
        {
            var result = new BgaPortfolioSecurityFactorChangesetInfo(model.Id, model.Username, model.Timestamp, model.CalculationId);

            return(result);
        }
 public void Resolve(BgaPortfolioSecurityFactorChangesetInfo changesetInfo)
 {
     this.Result = "Portfolio/Security overlay";
 }
Beispiel #7
0
 protected void SerializePortfolioSecurityTargetOverlayChangeset(
     BgaPortfolioSecurityFactorChangesetInfo changesetInfo, IJsonWriter writer)
 {
     this.SerializeChangeset(changesetInfo, writer);
 }