void ThrowIfContainerNotFound() { if (!Exists()) { throw StreamingErrors.ContainerNotFound(this); } }
void ThrowIfConditionFailed(StreamingCondition condition) { if (!Satisfy(condition)) { throw StreamingErrors.ConditionFailed(this, condition); } }
void ThrowIfItemNotFound() { if (!_parent.Contains(this)) { throw StreamingErrors.ItemNotFound(this); } }
void ThrowIfContainerNotFound() { if (!_file.Directory.Exists) { throw StreamingErrors.ContainerNotFound(this); } }
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); } }