Beispiel #1
0
        //Exetute pp
        public IBaseMessage ExecutePpeline(params IBaseMessage[] iMessages)
        {
            var inputs = new MsgColl();

            inputs.AddRange(iMessages);
            return(Executepp(inputs));
        }
Beispiel #2
0
        //Execute pipeline
        public MsgColl ExecutePP(IBaseMessage inputMessage)
        {
            if (inputMessage == null)
            {
                throw new ArgumentNullException("No input Message");
            }

            Gppipeline.InputMessages.Add(inputMessage);
            var output = new MsgColl();

            Gppipeline.Execute(ppcontext);

            IBaseMessage om = null;

            while ((om = Gppipeline.GetNextOutputMessage(ppcontext)) != null)
            {
                output.Add(om);

                if (om.BodyPart != null && om.BodyPart.Data != null)
                {
                    om.BodyPart.Data = putStream(om.BodyPart.Data);
                }
            }

            return(output);
        }
Beispiel #3
0
        public IBaseMessage Executepp(MsgColl inputMessages)
        {
            if (inputMessages == null)
            {
                throw new ArgumentNullException("inputMessages");
            }
            if (inputMessages.Count <= 0)
            {
                throw new ArgumentException("Must provide at least one input message", "inputMessages");
            }

            foreach (IBaseMessage inputMessage in inputMessages)
            {
                Gppipeline.InputMessages.Add(inputMessage);
            }

            var output = new MsgColl();

            Gppipeline.Execute(ppcontext);

            IBaseMessage om = Gppipeline.GetNextOutputMessage(ppcontext);

            return(om);
        }