Creates instances of the IEligibilityRule<T> interface, which can then be used by the VerifyEligibility(IEligibilityRule<TAspectTarget>) method.
Namespace: Metalama.Framework.Eligibility
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public static class EligibilityRuleFactory
Methods
Name | Description |
---|---|
CreateRule<T>(Action<IEligibilityBuilder<T>>, params Action<IEligibilityBuilder<T>>[]?) | Create an instance of the IEligibilityRule<T> interface, which can then be used by the VerifyEligibility(IEligibilityRule<TAspectTarget>) method. |
CreateRule<TGeneral, TRequired>(Action<IEligibilityBuilder<TRequired>>, params Action<IEligibilityBuilder<TRequired>>[]?) | |
GetAdviceEligibilityRule(AdviceKind) | Gets the default eligibility rules that apply to a specific advice. The rules returned by this method are those used by classes OverrideMethodAspect, OverrideFieldOrPropertyAspect and so on. If you implement the BuildEligibility(IEligibilityBuilder<T>) method manually, you can use this method to get the base rules, and add only rules that are specific to your aspect. |
GetContractAdviceEligibilityRule(ContractDirection) | Gets the default eligibility rules that apply to a contract advice for a specific direction. The rules returned by this method are those used by the ContractAspect class. If you implement the BuildEligibility(IEligibilityBuilder<T>) method manually, you can use this method to get the base rules, and add only rules that are specific to your aspect. |