public
Description: BizTalk 2006 library for unit-testing pipelines and custom pipeline components

Accessing Components

You can access components within a pipeline instance (whether created manually or loaded from a compiled assembly) in two different ways:

1. Enumerating through all components in the pipeline:


foreach ( IBaseComponent component in pipeline ) {
   // ...
}

This option has been available in all versions of the library, but it’s not very convenient to use in most scenarios

2. As of version 1.2.0.0 of PipelineTesting, you can now get a reference to a specific component within the pipeline instance, using the GetComponent() method. Components are located through the combination of stage they are in and the index of the component within the stage. The following snippet would retrieve the XmlAssembler component located as the first component within the assemble stage:


XmlAsmComp xmlassm = (XmlAsmComp)
            pipeline.GetComponent(PipelineStage.Assemble, 0);

Last edited by tomasr, about 1 month ago
Versions: