internal static DocumentationGenerator Create(string domainWithProtocol,
                                                      string fontPath,
                                                      DocumentType type,
                                                      string fileName)
        {
            var documentSettings = new DocumentSettings {
                DomainWithProtocol = domainWithProtocol,
                FileName           = fileName,
                Type     = type,
                FontPath = fontPath
            };

            var documentGenerator = new DocumentationGenerator(documentSettings);

            return(documentGenerator);
        }
        internal DocumentationGenerator(DocumentSettings settings)
        {
            DocumentType type = EnumValidator.IsValid(settings.Type) ? settings.Type : DocumentType.Pdf;

            if (type == DocumentType.Pdf)
            {
                FileName    = settings.FileName + ".pdf";
                ContentType = "application/pdf";

                _fileGenerator = new PdfGenerator(settings.FontPath, settings.DomainWithProtocol, settings.FileName);
            }

            if (type == DocumentType.Txt)
            {
                FileName    = settings.FileName + ".txt";
                ContentType = "text/plain";

                _fileGenerator = new TxtGenerator(settings.DomainWithProtocol);
            }
        }