private IParameter resolveInMoleculeBuildingBlock(IObjectPath containerPath, string parameterName, ParameterBuildMode buildMode) { if (!containerPath.Any()) { return(null); } var moleculeName = containerPath.Last(); var molecule = _moleculeBuildingBlock[moleculeName]; if (molecule == null) { return(null); } var parameter = molecule.Parameters.FirstOrDefault(p => p.IsNamed(parameterName) && p.BuildMode == buildMode); return(parameter); }