views:

106

answers:

1

I am working on a custom data transformation component. I'm using NUnit and NMock2 to test as I code. Testing and getting the custom UI and other features right is a huge pain, in part because I can't find any documentation about the order in which SSIS invokes methods on the component at design time as well as runtime.

I can correct the issues readily enough, but it's tedious and time consuming to unregister the old version, register the new version, fire up the test ssis package, try to display the UI, get an obscure error message, backtrace it, modify the component and continue.

One of the big issues involves the UI component needing access to the componentmetadata and buffermanager properties of the component at design time, and what I need to provide for to support properties that won't be initialized until after the user enters them in the UI.

I can work through it; but if someone knows of some docs or tips that would speed me up, I'd greatly appreciate it. The samples I've found havn't been much use; they seem to be directed to showing off cool stuff (Twitter, weather.com) rather than actual work.

Thanks in advance.

A: 

Here's a timeline of the run-time execution sequence: Run-time Methods of a Data Flow Component

The design-time sequence isn't laid out in MSDN that nicely because there just isn't such a sequence, but here's what I think/know: 1. ProvideComponentProperties - called ONCE EVER when the component is dropped on the design surface. 2. PerformUpgrade - called ONLY if the metadata version is different than the version attribute on the class - called on package load. 3. Validate - called FREQUENTLY... during package load, input attachment, entry into editor, etc... 4. ReinitializeMetaData - called infrequently, and only because a VS_NEEDSNEWMETADATA value is returned from Validate.

Everything other override (OnInputAttached, etc.) is fairly straightforward as to when it gets called. Here's the not-so-descriptive article: Design-time Methods of a Data Flow Component.

Todd McDermid

related questions