如何获取 IDTSComponentMetadata100 的 PipelineComponent
我正在为 SSIS 自定义管道组件编写 UI 编辑器。
当 BIDS 调用编辑器时,它将 IDTSComponentMetadata100 实例传递给编辑器。如何获取对我的(托管)PipelineComponent 派生实例的引用?
I'm writing a UI editor for an SSIS custom pipeline component.
When BIDS invokes the editor, it passes a IDTSComponentMetadata100 instance to the editor. How do I get a reference to my (managed) PipelineComponent derived instance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信您想做这样的事情:
您可以使用 serviceProvider 做其他有趣的事情,例如通过将不同的类型传递给 GetService 来检查包的连接或变量。有关详细信息,请参阅 SQL2008R2 BOL。
I believe that you want to do something like this:
You can do other interesting things with the serviceProvider, like inspecting the package's connections or variables, by passing a different type to GetService. See SQL2008R2 BOL for details.
尝试通过管道服务进行路由,但我的自定义数据流组件(用 C# 开发)不在 IDTSPipeline100.PathCollection 中 - 标准的 Microsoft 组件在 IDTSPipeline100.PathCollection 中。
更深入地挖掘,我尝试让 mainPipe.GetObjectByID(componentID) 有效,但它返回一个 COM 对象而不是 C#/托管对象。尝试强制转换会引发“无法从 COM 强制转换为 C#Managed”异常。
我无法确认,但强烈怀疑我的 C#/托管自定义组件没有显示在 PathCollection 中,因为它们是 C#/托管组件与 COM。
Tried the route via the pipeline service, but my custom data flow components (developed in C#) were not in the IDTSPipeline100.PathCollection - the standard Microsoft ones were.
Digging a bit deeper, I tried getting mainPipe.GetObjectByID(componentID) which works, but it returns a COM object not a C#/Managed object. Attempting to cast throws a "you can't cast from COM to C#Managed" exception.
I can't confirm, but strongly suspect that my C#/Managed custom components don't show up in the PathCollection as they are C#/Managed component vs. COM.