ContainsVolume() public method

public ContainsVolume ( string volume ) : bool
volume string
return bool
Example #1
0
 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 } });
     }
 }
Example #2
0
 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 }
         });
     }
 }