/// <summary> /// /// </summary> /// <param name="status"></param> /// <param name="file"></param> /// <param name="previousWatermark"></param> /// <param name="fromDirectory"> /// See <see cref="SoundboxFileMoveEvent.FromDirectory"/> /// </param> public FileResult(ResultStatus status, SoundboxNode file, Guid?previousWatermark, SoundboxDirectory fromDirectory = null) : base(status) { if (file != null) { File = file.Flatten(true); } PreviousWatermark = previousWatermark; if (fromDirectory != null) { FromDirectory = fromDirectory.Flatten() as SoundboxDirectory; } }
/// <summary> /// <see cref="SoundboxNode.Flatten"/>s the given node but preserves its <see cref="SoundboxNode.ParentDirectory"/> (in a flattened state). /// This the form we send out as events when the file tree changes. /// </summary> /// <param name="file"></param> /// <returns></returns> protected SoundboxNode FlattenForEvent(SoundboxNode file) { return(file.Flatten(true)); }