void ThrowIfContainerNotFound()
 {
     if (!Exists())
     {
         throw StreamingErrors.ContainerNotFound(this);
     }
 }
Exemple #2
0
 void ThrowIfConditionFailed(StreamingCondition condition)
 {
     if (!Satisfy(condition))
     {
         throw StreamingErrors.ConditionFailed(this, condition);
     }
 }
Exemple #3
0
 void ThrowIfItemNotFound()
 {
     if (!_parent.Contains(this))
     {
         throw StreamingErrors.ItemNotFound(this);
     }
 }
Exemple #4
0
 void ThrowIfContainerNotFound()
 {
     if (!_file.Directory.Exists)
     {
         throw StreamingErrors.ContainerNotFound(this);
     }
 }
Exemple #5
0
 void ThrowIfItemNotFound()
 {
     if (!_file.Exists)
     {
         throw StreamingErrors.ItemNotFound(this);
     }
 }
 public IEnumerable <string> ListItems()
 {
     try
     {
         return(_root.GetFiles().Select(f => f.Name).ToArray());
     }
     catch (DirectoryNotFoundException e)
     {
         throw StreamingErrors.ContainerNotFound(this, e);
     }
 }