コード例 #1
0
        public SenderConfiguration Send <T>(Action <T> msgInitializer, string destinationQueue) where T : class
        {
            var thisStep = new SendMessage(new Sender <T>(_componentBeingConfigured.MessageStuffer, destinationQueue, msgInitializer));

            _sequenceBeingConfigured.SetNextStep(thisStep);

            return(new SenderConfiguration(_componentBeingConfigured, _sequenceBeingConfigured, thisStep));
        }
コード例 #2
0
        public static SenderConfiguration CreateSendWithBind <TMsg>(ServiceStub componentBeingConfigured, IStepConfigurableMessageSequence sequenceBeingConfigured, Delegate msgInitializer, string destinationQueue)
        {
            var nextStep = new BindParametersAndSendMessage <TMsg>(componentBeingConfigured.MessageStuffer, destinationQueue, msgInitializer);

            sequenceBeingConfigured.SetNextStep(nextStep);

            return(new SenderConfiguration(componentBeingConfigured, sequenceBeingConfigured, nextStep));
        }
コード例 #3
0
        public static ExpectationConfiguration CreateExpectation <T>(ServiceStub componentBeingConfigured, IStepConfigurableMessageSequence sequenceBeingConfigured, Func <T, bool> comparator)
        {
            var nextStep = new VerifyExpectation(sequenceBeingConfigured, new RecievedSingleMessage(Helpers.PackComparatorAsFuncOfObject(comparator)));

            sequenceBeingConfigured.SetNextStep(nextStep);

            return(new ExpectationConfiguration(componentBeingConfigured, sequenceBeingConfigured));
        }
コード例 #4
0
        public static SenderConfiguration CreateSendWithNoBind <T>(ServiceStub componentBeingConfigured, IStepConfigurableMessageSequence sequenceBeingConfigured, Action <T> msgInitializer, string destinationQueue)
        {
            var nextStep = new SendMessage(new Sender <T>(componentBeingConfigured.MessageStuffer, destinationQueue, msgInitializer));

            sequenceBeingConfigured.SetNextStep(nextStep);

            return(new SenderConfiguration(componentBeingConfigured, sequenceBeingConfigured, nextStep));
        }