Skip to content

BusinessRule primary property as IPropertyInfo or PropertyInfo<> #3693

Discussion options

You must be logged in to vote

You are free to design the constructors on your rule classes as best fits your needs. PrimaryProperty of the rule class is type IPropertyInfo. As long as the type used on the constructor parameter implements IPropertyInfo, you can assign it to PrimaryProperty.

Within the Execute method, references to PrimaryProperty would still need to be cast. You could keep a secondary private variable of the PropertyInfo type to avoid using PrimaryProperty.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@rockfordlhotka
Comment options

@joshhanson314
Comment options

@rockfordlhotka
Comment options

Answer selected by joshhanson314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants