Update: I was incorrect in my original statements around dependency and supersedence having equivalent code. I’ll post a future example covering supersedence.
This post expands on the original sample program to demonstrate how you would add a dependency or supersedence relationship with another application. The sample here has a notable difference from the “real world” in that you would typically load the application definition for a relationship from the provider to get the required data. The sample here just clones the existing application which should be enough to demonstrate the basic concepts here.
First use the sample in this post, then add this code after line 41:
When you execute the program, the application will contain the dependency details:
Supersedence follows the exact same concepts except instead of adding to the Dependencies collection, you’re adding your rule to the Supersedence collection.
Download sample program Program.cs