Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of <see cref="ToSagaExpression{TSagaData,TMessage}" />.
 /// </summary>
 public ToSagaExpression(IConfigureHowToFindSagaWithMessage sagaMessageFindingConfiguration, Expression <Func <TMessage, object> > messageProperty)
 {
     Guard.AgainstNull(nameof(sagaMessageFindingConfiguration), sagaMessageFindingConfiguration);
     Guard.AgainstNull(nameof(messageProperty), messageProperty);
     this.sagaMessageFindingConfiguration = sagaMessageFindingConfiguration;
     this.messageProperty = messageProperty;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// <see cref="Saga.ConfigureHowToFindSaga"/>. Do not override this method.
        /// </summary>
        protected override void ConfigureHowToFindSaga(IConfigureHowToFindSagaWithMessage mapper)
        {
            VerifyNoConfigureHowToFindSaga();
            VerifyBase();
            var propertyMapper = new PropertyMapper <TSagaData>(mapper, GetExpression(), GetType());

            ConfigureMapping(propertyMapper);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Override this method in order to configure how this saga's data should be found.
 /// </summary>
 /// <remarks>Override <see cref="Saga.ConfigureHowToFindSaga"/> and forwards it to the generic version <see cref="ConfigureHowToFindSaga(SagaPropertyMapper{TSagaData})"/></remarks>
 internal protected override void ConfigureHowToFindSaga(IConfigureHowToFindSagaWithMessage sagaMessageFindingConfiguration)
 {
     ConfigureHowToFindSaga(new SagaPropertyMapper <TSagaData>(sagaMessageFindingConfiguration));
 }
Ejemplo n.º 4
0
 protected internal override void ConfigureHowToFindSaga(IConfigureHowToFindSagaWithMessage sagaMessageFindingConfiguration)
 {
 }
Ejemplo n.º 5
0
 protected override void ConfigureHowToFindSaga(IConfigureHowToFindSagaWithMessage mapper)
 {
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Override this method in order to configure how this saga's data should be found.
 /// </summary>
 protected internal abstract void ConfigureHowToFindSaga(IConfigureHowToFindSagaWithMessage sagaMessageFindingConfiguration);
Ejemplo n.º 7
0
 /// <summary>
 /// Constucts the expression
 /// </summary>
 /// <param name="sagaMessageFindingConfiguration"></param>
 /// <param name="messageProperty"></param>
 public ToSagaExpression(IConfigureHowToFindSagaWithMessage sagaMessageFindingConfiguration, Expression <Func <TMessage, object> > messageProperty)
 {
     this.sagaMessageFindingConfiguration = sagaMessageFindingConfiguration;
     this.messageProperty = messageProperty;
 }
Ejemplo n.º 8
0
 internal SagaPropertyMapper(IConfigureHowToFindSagaWithMessage sagaMessageFindingConfiguration)
 {
     this.sagaMessageFindingConfiguration = sagaMessageFindingConfiguration;
 }
Ejemplo n.º 9
0
 protected override void ConfigureHowToFindSaga(IConfigureHowToFindSagaWithMessage mapper)
 {
     mapper.ConfigureMapping <PaymentSagaData, RequestPayment>(message => message.PaymentId, payment => payment.PaymentId);
     mapper.ConfigureMapping <PaymentSagaData, CompletePayment>(message => message.PaymentId, payment => payment.PaymentId);
     mapper.ConfigureMapping <PaymentSagaData, CancelPayment>(message => message.PaymentId, payment => payment.PaymentId);
 }
Ejemplo n.º 10
0
 internal PropertyMapper(IConfigureHowToFindSagaWithMessage sagaMessageFindingConfiguration, Expression <Func <TSagaData, object> > sagaEntityProperty, Type sagaType)
 {
     this.sagaMessageFindingConfiguration = sagaMessageFindingConfiguration;
     this.sagaEntityProperty = sagaEntityProperty;
     this.sagaType           = sagaType;
 }