コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ToExpression{TData,TMessage}"/> class.
        /// </summary>
        /// <param name="correlation">The underlying <see cref="ICorrelateSagaToMessage">correlation</see>.</param>
        /// <param name="messageProperty">The message property <see cref="Expression{T}">expression</see> the saga property is correlated with.</param>
        public ToExpression(ICorrelateSagaToMessage correlation, Expression <Func <TMessage, object> > messageProperty)
        {
            Arg.NotNull(correlation, nameof(correlation));
            Arg.NotNull(messageProperty, nameof(messageProperty));

            this.correlation     = correlation;
            this.messageProperty = messageProperty;
        }
コード例 #2
0
ファイル: SagaMetadata.cs プロジェクト: xavierjohn/More.Cqrs
 static void Correlate <TData>(Type sagaType, ICorrelateSagaToMessage correlation) where TData : class, ISagaData =>
 ((ISaga <TData>)FormatterServices.GetUninitializedObject(sagaType)).CorrelateUsing(correlation);
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SagaCorrelator{TData}"/> class.
 /// </summary>
 /// <param name="correlation">The underlying <see cref="ICorrelateSagaToMessage">correlation</see>.</param>
 public SagaCorrelator(ICorrelateSagaToMessage correlation)
 {
     Arg.NotNull(correlation, nameof(correlation));
     this.correlation = correlation;
 }
コード例 #4
0
 void ISaga <TData> .CorrelateUsing(ICorrelateSagaToMessage correlation)
 {
     Contract.Requires <ArgumentNullException>(correlation != null, nameof(correlation));
 }