public QrCodeController(QrCodeRenderOptions renderOptions, IQrCodeRenderer renderer, ApiKeyProvider apiKeyProvider, IImageService imageService, IConfiguration config) { this.renderOptions = renderOptions; this.renderer = renderer; this.apiKeyProvider = apiKeyProvider; this.imageService = imageService; this.config = config; }
public async Task InvokeAsync(HttpContext context, IConfiguration config, QrCodeRenderOptions options) { defaults = config.GetSection("QrCodeDefaults"); this.context = context; // Overwrite default with any user provided options options.EccLevel = GetEccLevel(); options.LightColour = GetLightColour(); options.DarkColour = GetDarkColour(); options.DrawQuietZones = GetDrawQuietZones(); options.PixelsPerModule = GetPixelsPerModule(); options.RenderType = GetRenderType(); options.Preview = GetPreview(); await next(context); }
public QrCodeDataFactory(QrCodeRenderOptions renderOptions) { this.renderOptions = renderOptions; generator = new QRCodeGenerator(); }
public QrCodeImageRenderer(QrCodeRenderOptions renderOptions) { this.renderOptions = renderOptions; }
public Renderer(QrCodeRenderOptions renderOptions) { dataFactory = new QrCodeDataFactory(renderOptions); imageRenderer = new QrCodeImageRenderer(renderOptions); }