You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ConditionMethodExpression should not use reflection by default, but it should be the fallback option. Instead one should initialize with a standard lambda-delegate.
Registration of builtin condition-methods, should happen upfront.
Maybe just focus on having lamdba-delegates with 1 or 2 parameters:
1 parameter delegates can be used for transformation
2 parameter delegates can be used for comparison
Then obsolete methods with bonus parameter to ignore-case, instead just have 2 methods and use the one with the wanted ignores-case-behavior. Also mark ConditionMethodExpression as obsolete, and all logic that depends on upon it.
Maybe have some method "selection" based on the number of parameters found by the parser, so having the ability to register the same method-name multiple times, but with different number of parameters. Have validation whether method is available to support the provided input-parameters.
The text was updated successfully, but these errors were encountered:
ConditionMethodExpression should not use reflection by default, but it should be the fallback option. Instead one should initialize with a standard lambda-delegate.
Registration of builtin condition-methods, should happen upfront.
See also: #1779 + #5258
Replacing this logic with registration of lambda-delegates:
NLog/src/NLog/Config/ConfigurationItemFactory.cs
Lines 575 to 581 in 2ce4b17
Maybe just focus on having lamdba-delegates with 1 or 2 parameters:
Then obsolete methods with bonus parameter to ignore-case, instead just have 2 methods and use the one with the wanted ignores-case-behavior. Also mark
ConditionMethodExpression
as obsolete, and all logic that depends on upon it.Maybe have some method "selection" based on the number of parameters found by the parser, so having the ability to register the same method-name multiple times, but with different number of parameters. Have validation whether method is available to support the provided input-parameters.
The text was updated successfully, but these errors were encountered: