private Variable findVariable(ParameterInfo param, IMethodVariables chain) { var type = param.ParameterType; if (Aliases.ContainsKey(type)) { var actualType = Aliases[type]; var inner = chain.FindVariable(actualType); return(new CastVariable(inner, type)); } return(chain.TryFindVariableByName(type, param.Name, out var variable) ? variable : chain.FindVariable(type)); }
public bool TryFindVariableByName(Type dependency, string name, out Variable variable) { return(_inner.TryFindVariableByName(dependency, name, out variable)); }