public static Scope GetContainingScope(this GraphElement element) { if (element == null) { return(null); } return(element.GetProperty(containingScopePropertyKey) as Scope); }