Resolving Field Types at Runtime

  • Updated

Prerequisites:
Namespaces: InRule.Runtime
Classes:   FileSystemRuleApplicationReference, RuleSession, Entity
See Also:
References: InRule.Runtime.dll, InRule.Common.dll

To resolve the field type, you can use the following code:
// Test if this field refers to an entity
if (field.GetType() == typeof(InRule.Runtime.EntityField))
{
}

In a similar way, you can test if a collection contains entities:
// Test if this is a collection of entities
if (collection.GetType() == typeof(InRule.Runtime.EntityCollection))
{
}

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.