public void Pack(PackageCreator creator) { var path = Path; Func <IMediaFileData, bool> fileFilter = file => TestFile(file, path) && !creator.ExcludedPaths.Any(p => TestFile(file, p)); Func <IMediaFolderData, bool> folderFilter = folder => TestFolder(folder, path) && !creator.ExcludedPaths.Any(p => TestFolder(folder, p)); creator.AddData(fileFilter); creator.AddData(folderFilter); var files = DataFacade.GetData <IMediaFileData>().Where(fileFilter).ToList(); foreach (var mediaFileData in files) { creator.AddFileIfExists(@"App_Data\Media\" + mediaFileData.Id); } }
public void Pack(PackageCreator creator) { var path = Path; Func<IMediaFileData, bool> fileFilter = file => TestFile(file, path) && !creator.ExcludedPaths.Any(p => TestFile(file, p)); Func<IMediaFolderData, bool> folderFilter = folder => TestFolder(folder, path) && !creator.ExcludedPaths.Any(p => TestFolder(folder, p)); creator.AddData(fileFilter); creator.AddData(folderFilter); var files = DataFacade.GetData<IMediaFileData>().Where(fileFilter).ToList(); foreach (var mediaFileData in files) { creator.AddFileIfExists(@"App_Data\Media\" + mediaFileData.Id); } }