I see some suggestions requiring T to inherit from Stream. And it will work. But, if your T is really always a thread, why not just remove the general parameter and build this class as follows:
public abstract class PdfDocumentEditBaseService : IDocumentEditService
{
public Stream Rotate(Stream file, int pageNumber, float angle)
{
Document document = new Document(file);
document.Pages[pageNumber].Rotation = (RotationMode)angle;
document.SavePage(pageNumber);
return file;
}
source
share