public override void ProcessInput(int inputID, PipelineBuffer buffer) { base.ProcessInput(inputID, buffer); while (buffer.NextRow()) { var inputColumnId = GetInputColumnId(OutputObjectColumnName); var inputBytes = buffer.GetBlobData(inputColumnId, 0, (int)buffer.GetBlobLength(inputColumnId)); var inputXml = Encoding.UTF8.GetString(inputBytes); var inputObject = XmlSerializer.XmlDeserialize <TSource>(inputXml); var outputObject = ProcessInput(inputObject); var outputXml = XmlSerializer.XmlSerialize(outputObject); var outputBytes = Encoding.UTF8.GetBytes(outputXml); var outputColumnId = GetOutputColumnId(OutputObjectColumnName); AsynchronousOutputBuffer.AddRow(); AsynchronousOutputBuffer.AddBlobData(outputColumnId, outputBytes); } if (buffer.EndOfRowset) { AsynchronousOutputBuffer.SetEndOfRowset(); } }
public override void ProcessInput(int inputID, PipelineBuffer buffer) { base.ProcessInput(inputID, buffer); while (buffer.NextRow()) { var outputObject = ProcessInput(buffer); var outputXml = XmlSerializer.XmlSerialize(outputObject); var outputBytes = Encoding.UTF8.GetBytes(outputXml); AsynchronousOutputBuffer.AddRow(); AsynchronousOutputBuffer.AddBlobData(0, outputBytes); } if (buffer.EndOfRowset) { AsynchronousOutputBuffer.SetEndOfRowset(); } }