So first, I added IDisassemblerComponent to the list of interfaces being implemented in my pipeline component class.
Then, I added the following code:
private bool beginMessage = false;
private IPipelineContext pContext;
private IBaseMessage pInMsg;
void IDisassemblerComponent.Disassemble(IPipelineContext pContext, IBaseMessage pInMsg)
{
beginMessage = true;
this.pContext = pContext;
this.pInMsg = pInMsg;
}
IBaseMessage IDisassemblerComponent.GetNext(IPipelineContext pContext)
{
if (beginMessage)
{
beginMessage = false;
return Execute(pContext, pInMsg);
}
else
{
return null;
}
}
This will only work if the previous disassembler is supposed to produce one message.
4/29/2010 - Changed the code to reflect changes suggested by Johan Rex...