internal void PublishErrorImage() { const string address = ServerLauncher.ErrorAddress + ".svg"; var assembly = typeof(LaraUI).Assembly; var bytes = ClientLibraryHandler.LoadFile(assembly, "Integrative.Lara.Assets.Error.svg"); _published.Publish(address, new StaticContent(bytes, "image/svg+xml")); }
/// <summary> /// Initializes a new instance of the <see cref="LaraMiddleware"/> class. /// </summary> /// <param name="next">The next middleware</param> /// <param name="app">Lara application</param> /// <param name="options">Configuration options</param> public LaraMiddleware(RequestDelegate next, Application app, LaraOptions options) { options = options ?? throw new ArgumentNullException(nameof(options)); next = new ClientLibraryHandler(next).Invoke; next = new PublishedItemHandler(next, app, options).Invoke; next = new DiscardHandler(app, next).Invoke; next = new KeepAliveHandler(app, next).Invoke; _next = new PostEventHandler(app, next).Invoke; }
static TemplateBuilder() { _LibraryUrl = ClientLibraryHandler.GetLibraryPath(); }