public FileSystemInstrumentation(IPHostEntry[] hosts, string username, string password) { _errorMessageProvider = ErrorMessageProvider.Instance; _hostsList = new List<IPHostEntry>(); _hostsList.AddRange(hosts); _managementClassList = new List<Tuple<int, ManagementClass, WmiHandler>>(); foreach(var host in hosts) { var managementClass = ManagementClassFactory.Instance.GetManagementClass(_managementScopeString, _managementClassString, host, username, password); _managementClassList.Add(new Tuple<int, ManagementClass, WmiHandler>(_hostsList.IndexOf(host), managementClass, new WmiHandler(managementClass))); } }
public ShareInstrumentation(IPHostEntry host, string username, string password) { _errorMessageProvider = ErrorMessageProvider.Instance; _managementClass = ManagementClassFactory.Instance.GetManagementClass(_managementScopeString, _managementClassString, host, username, password); _handler = new WmiHandler(_managementClass); }