public T ResolveParam <T>(string name, T def = default(T)) { if (null != CurrentScope && CurrentScope.ContainsKey(name)) { return(CurrentScope[name].To <T>()); } if (PlainConfig.ContainsKey(name)) { return(PlainConfig[name].To <T>()); } var result = Config.AttrOrElement(name); if (!string.IsNullOrWhiteSpace(result)) { return(result.To <T>()); } return(def); }