Prerequisites: A valid RuleRepositoryDefBase, A valid EvalNetwork
Namespaces: InRule.Repository, InRule.Repository.Infos
Classes: RuleApplicationDef, RuleRepositoryDefBase, DefUsageNetwork, FieldDef
References: InRule.Common.dll, InRule.Repository.dll
Determine FieldDef Dependencies
The following recursive method shows how to identify all FieldDef dependencies for a given RuleRepositoryDefBase object.
public static IEnumerable<DefUsage> GetDependentFieldDefs(RuleRepositoryDefBase def,
DefUsageNetwork network)
{
// Create collection of all usages by the given definition
var usages = network.GetDefUsages(def.Guid, true);
// Return list of dependencies
return usages;
}
Instantiate the DefUsageNetwork
The following code snippet demonstrates the proper way to create an instance of the DefUsageNetwork.
public static DefUsageNetwork GetDefUsageNetwork(RuleApplicationDef ruleAppDef)
{
return DefUsageNetwork.Create(ruleAppDef);
}
Comments
0 comments
Please sign in to leave a comment.