public AdoxioLicenseController(IDynamicsClient dynamicsClient, IConfiguration configuration, IHttpContextAccessor httpContextAccessor, PdfClient pdfClient) { Configuration = configuration; _dynamicsClient = dynamicsClient; _httpContextAccessor = httpContextAccessor; _pdfClient = pdfClient; }
public WorkerController(IConfiguration configuration, IDynamicsClient dynamicsClient, IHttpContextAccessor httpContextAccessor, ILoggerFactory loggerFactory, PdfClient pdfClient) { Configuration = configuration; _dynamicsClient = dynamicsClient; _httpContextAccessor = httpContextAccessor; _logger = loggerFactory.CreateLogger(typeof(WorkerController)); _pdfClient = pdfClient; }
public async void can_get_submission_pdf() { PdfClient pdf = new PdfClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST); Stream response = await pdf.GetSubmissionPdf(formId, submissionId); Assert.NotNull(response); }
public AdoxioLicenseController(IDynamicsClient dynamicsClient, IConfiguration configuration, IHttpContextAccessor httpContextAccessor, PdfClient pdfClient, ILoggerFactory loggerFactory) { Configuration = configuration; _dynamicsClient = dynamicsClient; _httpContextAccessor = httpContextAccessor; _pdfClient = pdfClient; _logger = loggerFactory.CreateLogger(typeof(AdoxioApplicationController)); }
public PoliceJurisdictionsController(IDynamicsClient dynamicsClient, IHttpContextAccessor httpContextAccessor, PdfClient pdfClient, ILoggerFactory loggerFactory, IMemoryCache memoryCache) { _cache = memoryCache; _dynamicsClient = dynamicsClient; _httpContextAccessor = httpContextAccessor; _pdfClient = pdfClient; _logger = loggerFactory.CreateLogger(typeof(LicensesController)); }
public async void can_generate_pdf() { PdfClient pdf = new PdfClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST); GeneratePdfOptionsRequest pdfOptionsRequest = new GeneratePdfOptionsRequest(); Html body = new Html(); body.html = "<body>PDF Test</body>"; pdfOptionsRequest.body = body; Stream response = await pdf.GeneratePdf(pdfOptionsRequest); Assert.NotNull(response); }
public async Task <FileResult> CreatePdf() { var client = new PdfClient(); client.SetUrl("http://localhost:55892/api/PDFGeneration"); var inputModel = new PDFRaportInputModel(); inputModel.ItemList = new List <ItemModel>(); Mapper.Map(_itemService.GetAllItems(), inputModel.ItemList); var file = await client.PostWithFile(inputModel); return(File(file, "application/pdf")); }
/// <summary> /// Setup the test /// </summary> public PDF() { Configuration = new ConfigurationBuilder() // The following line is the only reason we have a project reference for cllc-public-app. // If you were to use this code on a different project simply add user secrets as appropriate to match the environment / secret variables below. .AddUserSecrets <Startup>() // Add secrets from the cllc-public-app .AddEnvironmentVariables() .Build(); baseUri = Configuration["PDF_SERVICE_BASE_URI"]; jwtToken = Configuration["PDF_JWT_TOKEN"]; _pdfClient = new PdfClient(baseUri, $"Bearer {jwtToken}"); }
public void can_be_constructed() { PdfClient pdf = new PdfClient(ACCESS_KEY, SECRET_KEY); Assert.NotNull(pdf); }