Beispiel #1
0
 public Changeset(Int32 targetingTypeId, TargetingTypeBasketBaseValueChangesetInfo latestChangesetInfo, String username, IEnumerable <IChange> changes)
 {
     this.TargetingTypeId         = targetingTypeId;
     this.Username                = username;
     this.LatestChangesetSnapshot = latestChangesetInfo;
     this.Changes = changes.ToList();
 }
Beispiel #2
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 override void ApplyChangeset(Changeset changeset, Int32 changesetId, Int32 computationId, IDataManager manager)
        {
            var changesetInfo = new TargetingTypeBasketBaseValueChangesetInfo(
                changesetId,
                changeset.Username,
                DateTime.Now, // <--------- will be ignored
                computationId
                );

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

            return(result);
        }
Beispiel #5
0
        protected TargetingTypeBasketBaseValueChangesetInfo DeserializeTargetingTypeBasketBaseValueChangesetInfo(ChangesetModel model)
        {
            var result = new TargetingTypeBasketBaseValueChangesetInfo(model.Id, model.Username, model.Timestamp, model.CalculationId);

            return(result);
        }
 public void Resolve(TargetingTypeBasketBaseValueChangesetInfo changesetInfo)
 {
     this.Result = "Targeting-type/Basket base";
 }
Beispiel #7
0
 protected void SerializeTargetingTypeBasketBaseValueChangeset(
     TargetingTypeBasketBaseValueChangesetInfo changesetInfo, IJsonWriter writer)
 {
     this.SerializeChangeset(changesetInfo, writer);
 }