DEV Community

loading...

Discussion on: A Pythonic Guide to SOLID Design Principles

Collapse
lostmsu profile image
Victor

In the generateReport function signature you either have to specify the concrete FTPClient class as the parameter type

void generateReport<TTransferClient>(TTransferClient client)
  where TTransferClient: ICanUpload, ICanDownload
{
  ...
}

Also, I think IFTPClient is a violation of SRP in this case. You should simply take in both separately (ICanUpload uploader, ICanDownload downloader).