private void addFileRow(
            string postBackIdBase, Func <int, ResourceInfo> thumbnailResourceGetter, IEnumerable <int> openedFileIds, MarkFileAsReadMethod unopenedFileOpenedNotifier,
            EwfTable table, BlobFile file)
        {
            var cells = new List <EwfTableCell>();

            var thumbnailControl = BlobManagementStatics.GetThumbnailControl(file, thumbnailResourceGetter);

            if (thumbnailControl.Any())
            {
                cells.Add(thumbnailControl.ToCell());
            }

            var fileIsUnopened = openedFileIds != null && !openedFileIds.Contains(file.FileId);

            cells.Add(
                new EwfButton(
                    new StandardButtonStyle(file.FileName),
                    behavior: new PostBackBehavior(
                        postBack: PostBack.CreateFull(
                            id: PostBack.GetCompositeId(postBackIdBase, file.FileId.ToString()),
                            firstModificationMethod: () => {
                if (fileIsUnopened)
                {
                    unopenedFileOpenedNotifier?.Invoke(file.FileId);
                }
            },
                            actionGetter: () => new PostBackAction(
                                new PageReloadBehavior(secondaryResponse: new SecondaryResponse(new BlobFileResponse(file.FileId, () => true), false))))))
                .ToCollection()
                .ToCell());

            cells.Add(file.UploadedDate.ToDayMonthYearString(false).ToCell());
            cells.Add((fileIsUnopened ? "New!" : "").ToCell(new TableCellSetup(classes: "ewfNewness".ToCollection())));

            table.AddItem(EwfTableItem.Create(cells, setup: EwfTableItemSetup.Create(id: new SpecifiedValue <int>(file.FileId))));
        }
 private EwfTableItem(EwfTableItemSetup setup, IReadOnlyCollection <EwfTableCell> cells) : base(setup, cells)
 {
 }
 /// <summary>
 /// Creates a table item with a specified ID type.
 /// </summary>
 /// <param name="setup">The setup object for the item.</param>
 /// <param name="cells">The cells in this item.</param>
 public static EwfTableItem <IdType> CreateWithIdType <IdType>(EwfTableItemSetup <IdType> setup, params EwfTableCell[] cells) =>
 new EwfTableItem <IdType>(setup, cells);
 /// <summary>
 /// Creates a table item with a specified ID type.
 /// </summary>
 /// <param name="cells">The cells in this item.</param>
 /// <param name="setup">The setup object for the item.</param>
 public static EwfTableItem <IdType> CreateWithIdType <IdType>(IReadOnlyCollection <EwfTableCell> cells, EwfTableItemSetup <IdType> setup = null) =>
 new EwfTableItem <IdType>(setup, cells);
 /// <summary>
 /// Creates a table item.
 /// </summary>
 /// <param name="setup">The setup object for the item.</param>
 /// <param name="cells">The cells in this item.</param>
 public static EwfTableItem Create(EwfTableItemSetup setup, params EwfTableCell[] cells) => new EwfTableItem(setup, cells);
 /// <summary>
 /// Creates a table item.
 /// </summary>
 /// <param name="cells">The cells in this item.</param>
 /// <param name="setup">The setup object for the item.</param>
 public static EwfTableItem Create(IReadOnlyCollection <EwfTableCell> cells, EwfTableItemSetup setup = null) => new EwfTableItem(setup, cells);