public static CompoundParameterContext Register( [NotNull] DynamicParameterContext parentContext, [NotNull] MemberInfo compoundParameterMember, [NotNull] ICompoundParameter compoundParameterValue) { if (parentContext is null) { throw new ArgumentNullException(nameof(parentContext)); } if (compoundParameterMember is null) { throw new ArgumentNullException(nameof(compoundParameterMember)); } if (compoundParameterValue is null) { throw new ArgumentNullException(nameof(compoundParameterValue)); } var context = _contexts.GetValue( compoundParameterValue, _ => new CompoundParameterContext(parentContext, compoundParameterMember)); return(context); }
private void ProcessDynamicCompoundParameter( [NotNull] MemberInfo compoundMember, [NotNull] ICompoundParameter compoundParameter) { var context = CompoundParameterContext.Register(this, compoundMember, compoundParameter); compoundParameter.ConfigureDynamicParameters(context); }
public static CompoundParameterContext GetContext( [NotNull] ICompoundParameter compoundParameter) { if (compoundParameter is null) { throw new ArgumentNullException(nameof(compoundParameter)); } bool result = _contexts.TryGetValue(compoundParameter, out var context); if (!result) { throw new ArgumentException(); } return(context); }