/// <summary> /// Initialises a new instance of the <see cref="TaskExecutor" /> class. /// </summary> /// <param name="apiOperationExecutor">The API operation executor that can handle incoming background tasks.</param> /// <param name="rootServiceProvider">The root <see cref="IServiceProvider" /> of the application.</param> public TaskExecutor( IApiOperationExecutor apiOperationExecutor, IServiceProvider rootServiceProvider) { this._apiOperationExecutor = apiOperationExecutor; this._rootServiceProvider = rootServiceProvider; }
public CounterService( IOptionsMonitor <CounterConfiguration> configuration, IApiOperationExecutor apiOperationExecutor, ILogger <CounterService> logger) { this.configuration = configuration; this.apiOperationExecutor = apiOperationExecutor; this.logger = logger; }
public BlueprintApiRouter( IApiOperationExecutor apiOperationExecutor, IServiceProvider rootServiceProvider, ILogger <BlueprintApiRouter> logger, IOptions <BlueprintHttpOptions> httpOptions, string basePath) { this._apiOperationExecutor = apiOperationExecutor; this._rootServiceProvider = rootServiceProvider; this._logger = logger; this._httpOptions = httpOptions; this._basePath = basePath; }
public PlainTextResult Invoke(IApiOperationExecutor executor) { var codeDidIGenerate = ((CodeGennedExecutor)executor).WhatCodeDidIGenerate() .Replace("<", "<") .Replace(">", ">"); var template = $@" <!DOCTYPE html> <html> <body> <style>body {{ margin: 0 }}</style> <link href=""https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/themes/prism-okaidia.css"" rel=""stylesheet"" /> <pre style=""margin: 0; border-radius: 0;""><code class=""language-csharp"">{codeDidIGenerate}</code></pre> <script src=""https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/prism.js""></script> <script src=""https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/components/prism-csharp.js""></script> </body> </html>"; return(new PlainTextResult(template) { ContentType = "text/html" }); }