private void StartNewSaga(IEventMessage @event, AssociationValue associationValue, Segment segment)
        {
            var newSaga = _sagaRepository.CreateInstance(CreateSagaIdentifier(segment), _sagaFactory);

            newSaga.AssociationValues.Add(associationValue);
            DoInvokeSaga(@event, newSaga);
        }
        public bool Remove(AssociationValue associationValue)
        {
            var removed = _values.Remove(associationValue);

            if (removed)
            {
                if (!_addedValues.Remove(associationValue))
                {
                    _removedValues.Add(associationValue);
                }
            }
            return(removed);
        }
Exemple #3
0
 protected abstract void DoAssociateWith(AssociationValue associationValue);
Exemple #4
0
 protected abstract void DoRemoveAssociation(AssociationValue associationValue);
Exemple #5
0
 public static void AssociateWith(AssociationValue associationValue)
 {
     Instance.DoAssociateWith(associationValue);
 }
 public bool Contains(AssociationValue associatedValue) => _values.Contains(associatedValue);
Exemple #7
0
 protected override void DoRemoveAssociation(AssociationValue property) => AssociationValues.Remove(property);
Exemple #8
0
 protected override void DoAssociateWith(AssociationValue property) => AssociationValues.Add(property);