private bool ContentsAreInTrash() { if (RequestIdList.Count == 0) { return(TrashBin.IsInTrash(ContextNode as GenericContent)); } return(RequestNodeList.Count(n => TrashBin.IsInTrash(n as GenericContent)) > 0); }
private bool ContentsAreTrashable() { if (RequestIdList.Count == 0) { var gc = ContextNode as GenericContent; return(gc != null && gc.IsTrashable); } return(RequestNodeList.Select(node => node as GenericContent).All(gc => gc != null && gc.IsTrashable)); }