Beispiel #1
0
        public ChangeCoverCollectionEvent CreateChangeCoverCollectionEvent(int ccId, Dictionary <string, int> changes, int valeur)
        {
            if (!CoverCollections.Any(x => x.Id.Equals(ccId)))
            {
                return(null);
            }
            var ce = new ChangeCoverCollectionEvent(ccId, changes, valeur);

            CoverCollectionEvents.Add(ce);
            return(ce);
        }
Beispiel #2
0
 private static void HandleMessage(object sender, NotifyCollectionChangedEventArgs e)
 {
     foreach (var msg in e.NewItems)
     {
         var changeEvent = AgreementEvents.Single(x => x.Id.Equals(((Message)msg).EventId));
         var ccs         = CoverCollections.Where(x => x.AgreementId.Equals(changeEvent.AgreementId));
         foreach (var cc in ccs)
         {
             DoCalculations(cc.Id, changeEvent.ValeurDate);
         }
     }
 }
Beispiel #3
0
 public static ICollection <CoverCollection> GetCoverCollectionBranch(int id, int valeur1, int valeur2, DateTime realTime)
 {
     return(CoverCollections.SingleOrDefault(x => x.Id.Equals(id))?.GetBranch(valeur1, valeur2, realTime));
 }
Beispiel #4
0
 public static ICollection <CoverCollection> GetCoverCollections(int id, int vt1, int vt2)
 {
     return(CoverCollections.SingleOrDefault(x => x.Id.Equals(id))?.Get(vt1, vt2));
 }
Beispiel #5
0
 public static CoverCollection GetCoverCollection(int id, int valeur)
 {
     return(CoverCollections.SingleOrDefault(x => x.Id.Equals(id))?.Get(valeur));
 }
Beispiel #6
0
        public ICollection <CoverCollection> GetCoverCollections(int valeur)
        {
            var result = CoverCollections.Where(x => x.Get(valeur) != null);

            return(result.ToList());
        }