public void Monitor(List<string> volumes, MyEverythingDB db) { foreach (var volume in volumes) { if (string.IsNullOrEmpty(volume)) throw new InvalidOperationException("Volume cant't be null or empty string."); if (!db.ContainsVolume(volume)) throw new InvalidOperationException(string.Format("Volume {0} must be scaned first.")); Thread th = new Thread(new ParameterizedThreadStart(MonitorThread)); th.Start(new Dictionary<string, object> { { "Volume", volume }, { "MyEverythingDB", db } }); } }
public void Monitor(List <string> volumes, MyEverythingDB db) { foreach (var volume in volumes) { if (string.IsNullOrEmpty(volume)) { throw new InvalidOperationException("Volume cant't be null or empty string."); } if (!db.ContainsVolume(volume)) { throw new InvalidOperationException(string.Format("Volume {0} must be scaned first.")); } Thread th = new Thread(new ParameterizedThreadStart(MonitorThread)); th.Start(new Dictionary <string, object> { { "Volume", volume }, { "MyEverythingDB", db } }); } }