ContainsVolume() 공개 메소드

public ContainsVolume ( string volume ) : bool
volume string
리턴 bool
예제 #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 } });
     }
 }
예제 #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 }
         });
     }
 }