public static FromDelegate ( Func |
||
resolver | Func |
|
Результат |
/// <summary> /// Gets the available parameters for the specified data context type, /// with a specific data context adapter to adapt original data context to the final data context to which the parameters is applicable. /// </summary> /// <param name="dataContextType">The data context type.</param> /// <param name="dataContextAdapter">The adapter to adapt original data context to the final data context.</param> /// <returns>Available parameters.</returns> public IEnumerable <RuleParameter> GetParameters(Type dataContextType, Func <object, object> dataContextAdapter) { Require.NotNull(dataContextType, "dataContextType"); var containerResolver = RuleParameterValueResolver.Dumb(); if (dataContextAdapter != null) { Func <RuleParameter, object, object> resolver = (param, dataContext) => dataContextAdapter(dataContext); containerResolver = RuleParameterValueResolver.FromDelegate(resolver); } return(FindConditionParameters(dataContextType, containerResolver, null)); }