public IIntegrationMessage Execute(IPipeliningContext pipeliningContext) { this.WriteLogSynchronized("PIPELINE: Excuting send pipeline on thread '{0}'.", Thread.CurrentThread.ManagedThreadId); if ((object)pipeliningContext == null) throw new ArgumentNullException("pipeliningContext"); return null; }
public IEnumerable<IIntegrationMessage> Execute(IPipeliningContext pipeliningContext, IIntegrationMessage integrationMessage) { IReceiveStage receiveStage; IEnumerable<IIntegrationMessage> stagedIntegrationMessages; IEnumerable<IIntegrationMessage> splitIntegrationMessages; List<IIntegrationMessage> accumulatedIntegrationMessages; this.WriteLogSynchronized("PIPELINE: Excuting receive pipeline on thread '{0}'.", Thread.CurrentThread.ManagedThreadId); if ((object)pipeliningContext == null) throw new ArgumentNullException("pipeliningContext"); if ((object)integrationMessage == null) throw new ArgumentNullException("integrationMessage"); accumulatedIntegrationMessages = new List<IIntegrationMessage>(); stagedIntegrationMessages = new IIntegrationMessage[] { integrationMessage }; foreach (Type receiveStageType in this.GetStageTypes().Values) { receiveStage = Activator.CreateInstance(receiveStageType, true) as IReceiveStage; if ((object)receiveStage == null) throw new InvalidOperationException("Bad receive stage type."); this.TrackStageInstance(receiveStage); try { receiveStage.Initialize(); receiveStage.Freeze(); accumulatedIntegrationMessages.Clear(); foreach (IIntegrationMessage stagedIntegrationMessage in stagedIntegrationMessages) { splitIntegrationMessages = receiveStage.Execute(pipeliningContext, stagedIntegrationMessage); accumulatedIntegrationMessages.AddRange(splitIntegrationMessages); } } finally { receiveStage.Terminate(); // dispose } } return accumulatedIntegrationMessages; }
public abstract IIntegrationMessage Execute(IPipeliningContext pipeliningContext);
public override IEnumerable<IIntegrationMessage> Execute(IPipeliningContext pipeliningContext, IIntegrationMessage integrationMessage) { //return new IIntegrationMessage[] { }; return new IIntegrationMessage[] { integrationMessage }; }
public abstract IEnumerable<IIntegrationMessage> Execute(IPipeliningContext pipeliningContext, IIntegrationMessage integrationMessage);
public override IIntegrationMessage Execute(IPipeliningContext pipeliningContext) { return null; }