Skip to content

Commit

Permalink
Create installation
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed Nov 6, 2024
1 parent db70c31 commit e07487b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/Elmah.Io.AspNetCore/ElmahIoExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public static IApplicationBuilder UseElmahIo(this IApplicationBuilder app)
throw new InvalidOperationException("No elmah.io dependencies have been registered. Make sure to call the AddElmahIo method in the ConfigureServices method in Startup.cs like this: services.AddElmahIo(...) or in the Program.cs file like this: builder.Services.AddElmahIo(...)");
}

MessageShipper.CreateInstallation(app);

return app.UseMiddleware<ElmahIoMiddleware>();
}

Expand Down
10 changes: 8 additions & 2 deletions src/Elmah.Io.AspNetCore/MessageShipper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@
using Elmah.Io.AspNetCore.Breadcrumbs;
using Elmah.Io.AspNetCore.Extensions;
using Elmah.Io.Client;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;

namespace Elmah.Io.AspNetCore
{
internal static class MessageShipper
{
private static string _assemblyVersion = typeof(MessageShipper).Assembly.GetName().Version.ToString();
private static string _aspNetCoreAssemblyVersion = typeof(HttpContext).Assembly.GetName().Version.ToString();
private static readonly string _assemblyVersion = typeof(MessageShipper).Assembly.GetName().Version.ToString();
private static readonly string _elmahIoClientAssemblyVersion = typeof(IElmahioAPI).Assembly.GetName().Version.ToString();
private static readonly string _aspNetCoreAssemblyVersion = typeof(HttpContext).Assembly.GetName().Version.ToString();

public static void Ship(Exception exception, string title, HttpContext context, ElmahIoOptions options, IBackgroundTaskQueue queue)
{
Expand Down

0 comments on commit e07487b

Please sign in to comment.