protected ParameterScope(ParameterScopeLevel scopeLevel, ParameterScope parentScope) { ScopeLevel = scopeLevel; ParentScope = parentScope; if (parentScope != null) { parentScope.RegisterChildScope(this); } ChildScopes = new List <ParameterScope>(); }
public ParameterScope GetHigherScope(ParameterScopeLevel scopeLevel) { if (scopeLevel == ScopeLevel) { return(this); } if (ParentScope == null) { return(null); } return(ParentScope.GetHigherScope(scopeLevel)); }
public ParameterScope GetFromHeirachyAtLevel(ParameterScopeLevel parameterScopeLevel) { return(callingHeirachy.Find(s => s.ScopeLevel == parameterScopeLevel)); }