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