private void ProcessDynamicCompoundParameter( [NotNull] MemberInfo compoundMember, [NotNull] ICompoundParameter compoundParameter) { var context = CompoundParameterContext.Register(this, compoundMember, compoundParameter); compoundParameter.ConfigureDynamicParameters(context); }
public static DynamicParameterInstance EnableDynamicParameter <T, TParameter>( [NotNull] this T parameter, [NotNull] Expression <Func <T, TParameter> > parameterExpression) where T : ICompoundParameter { if ((ICompoundParameter)parameter is null) { throw new ArgumentNullException(nameof(parameter)); } if (parameterExpression is null) { throw new ArgumentNullException(nameof(parameterExpression)); } var context = CompoundParameterContext.GetContext(parameter); var members = Utilities.ParseExpression((MemberExpression)parameterExpression.Body); var instance = context.EnableParameter(members); return(instance); }