我正在使用工具(C#.Net)来分析 SSIS 包。在这里,我使用Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSComponentMetaData100
(dts.interop 中的类)类来迭代数据流任务(MainPipe)。请在下面找到代码。
//Cast the Executable as a data flow
MainPipe pipe = (MainPipe)taskHost.InnerObject;
foreach (IDTSComponentMetaData100 comp in pipe.ComponentMetaDataCollection)
{
//Here i need
//1. Source details
//2. Destination details
}
是否可以将每个IDTSComponentMetaData100
对象类型转换为 XMLSource、OLEDB Destination 等数据流组件的某些对象?如果可能,我将如何识别来源、目的地等?
如果不可能,请提供一些提示来实现这一点。