Skip to content

Instantly share code, notes, and snippets.

@TheFo2sh
Created March 20, 2023 00:52
Show Gist options
  • Save TheFo2sh/db1df95f83a54309e679338676b0fcdf to your computer and use it in GitHub Desktop.
Save TheFo2sh/db1df95f83a54309e679338676b0fcdf to your computer and use it in GitHub Desktop.
public class PdfGenerator
{
public async Task GeneratePdfAsync(string htmlContent)
{
// generate PDF from HTML content
}
}
public class MyClass
{
private readonly PdfGenerator _pdfGenerator;
public MyClass(PdfGenerator pdfGenerator)
{
_pdfGenerator = pdfGenerator;
}
public async Task GeneratePdf(string htmlContent)
{
await _pdfGenerator.GeneratePdfAsync(htmlContent);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment