public WmiDataProvider(WMISettings settings) : base(settings) { _config = settings; _wmiNodes.AddRange(InitNodeList(_config.Nodes).OrderBy(x => x.Endpoint).ToList()); // Do this ref cast list once AllNodes.AddRange(_wmiNodes.Cast <Node>().ToList()); // For fast lookups _wmiNodeLookup = new Dictionary <string, WmiNode>(_wmiNodes.Count); foreach (var n in _wmiNodes) { _wmiNodeLookup[n.Id] = n; } }