/// <summary> /// Adds a pipeline component to the decode stage /// </summary> /// <param name="decoder">The component to add</param> /// <returns>This instance</returns> public ReceivePipelineBuilder WithDecoder(IBaseComponent decoder) { if (decoder == null) { throw new ArgumentNullException("decoder"); } _pipeline.AddComponent(decoder, PipelineStage.Decode); return(this); }
private static ReceivePipelineWrapper GeneratePipeline(string customPropertyNamespace, bool excludeSystemProperties) { PropertyMessageDecoder propertyMessageDecoder = new PropertyMessageDecoder(); propertyMessageDecoder.CustomPropertyNamespace = customPropertyNamespace; propertyMessageDecoder.ExcludeSystemProperties = excludeSystemProperties; ReceivePipelineWrapper pipeline = PipelineFactory.CreateEmptyReceivePipeline(); pipeline.AddComponent(propertyMessageDecoder, PipelineStage.Decode); pipeline.AddComponent(new Microsoft.BizTalk.Component.XmlDasmComp(), PipelineStage.Disassemble); pipeline.AddDocSpec(typeof(PropertyMessage)); return(pipeline); }
public void ThrowExceptionWhenComponentAddedToInvalidStage() { ReceivePipelineWrapper pipeline = PipelineFactory.CreateEmptyReceivePipeline(); IBaseComponent partyResolution = new PartyRes(); pipeline.AddComponent(partyResolution, PipelineStage.PreAssemble); }
public void ThrowExceptionWhenCompponentAddedToNullStage() { ReceivePipelineWrapper pipeline = PipelineFactory.CreateEmptyReceivePipeline(); IBaseComponent partyResolution = new PartyRes(); pipeline.AddComponent(partyResolution, null); }
public void CanAddComponentToValidStage() { ReceivePipelineWrapper pipeline = PipelineFactory.CreateEmptyReceivePipeline(); IBaseComponent component = new XmlDasmComp(); pipeline.AddComponent(component, PipelineStage.Disassemble); }
public void Setup() { rcvpipeline = PipelineFactory.CreateEmptyReceivePipeline(); XmlDasmComp xmlDasmComp = new XmlDasmComp(); rcvpipeline.AddComponent(xmlDasmComp, PipelineStage.Disassemble); sndpipeline = PipelineFactory.CreateEmptySendPipeline(); if (!File.Exists(googlecredentials)) { } }
public void CanExecutePipelineWithMultiMsgOutput() { ReceivePipelineWrapper pipeline = PipelineFactory.CreateEmptyReceivePipeline(); pipeline.AddComponent(new XmlDasmComp(), PipelineStage.Disassemble); pipeline.AddDocSpec(typeof(SimpleBody)); pipeline.AddDocSpec(typeof(SimpleEnv)); Stream stream = DocLoader.LoadStream("Env_Batch_Input.xml"); IBaseMessage inputMessage = MessageHelper.CreateFromStream(stream); MessageCollection outputMessages = pipeline.Execute(inputMessage); Assert.IsNotNull(outputMessages); Assert.AreEqual(3, outputMessages.Count); }
public void ThrowExceptionWhenAddingNullComponent() { ReceivePipelineWrapper pipeline = PipelineFactory.CreateEmptyReceivePipeline(); pipeline.AddComponent(null, PipelineStage.ResolveParty); }