Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Apr 5, 2024
1 parent 0b7d832 commit cd4bb46
Showing 9 changed files with 32 additions and 40 deletions.
25 changes: 12 additions & 13 deletions src/BUTR.CrashReport.Renderer/CrashReportWindow.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using BUTR.CrashReport.Renderer.Controller;
using BUTR.CrashReport.Interfaces;
using BUTR.CrashReport.Models;
using BUTR.CrashReport.Renderer.Controller;
using BUTR.CrashReport.Renderer.ImGui;
using BUTR.CrashReport.Renderer.Renderer;

using BUTR.CrashReport.Interfaces;
using BUTR.CrashReport.Models;

using Silk.NET.Core.Loader;
using Silk.NET.Input;
using Silk.NET.Input.Glfw;
@@ -27,20 +26,20 @@ static CrashReportWindow()
GlfwWindowing.RegisterPlatform();
}

public static void ShowAndWait(Exception exception, IList<LogSource> logSources, Dictionary<string,string> additionalMetadata,
ICrashReportMetadataProvider crashReportMetadataProvider,
IStacktraceFilter stacktraceFilter,
IAssemblyUtilities assemblyUtilities,
IModuleProvider moduleProvider,
ILoaderPluginProvider loaderPluginProvider,
public static void ShowAndWait(Exception exception, IList<LogSource> logSources, Dictionary<string, string> additionalMetadata,
ICrashReportMetadataProvider crashReportMetadataProvider,
IStacktraceFilter stacktraceFilter,
IAssemblyUtilities assemblyUtilities,
IModuleProvider moduleProvider,
ILoaderPluginProvider loaderPluginProvider,
IHarmonyProvider harmonyProvider,
IModelConverter modelConverter,
IPathAnonymizer pathAnonymizer,
IModelConverter modelConverter,
IPathAnonymizer pathAnonymizer,
ICrashReportRendererUtilities crashReportRendererUtilities)
{
if (PathResolver.Default is DefaultPathResolver pr)
pr.Resolvers = [path => crashReportRendererUtilities.GetNativeLibrariesFolderPath().Select(x => Path.Combine(x, path))];

var crashReport = CrashReportInfo.Create(exception, additionalMetadata, stacktraceFilter, assemblyUtilities, moduleProvider, loaderPluginProvider, harmonyProvider);

var crashReportModel = CrashReportInfo.ToModel(crashReport, crashReportMetadataProvider, modelConverter, moduleProvider, loaderPluginProvider, assemblyUtilities, pathAnonymizer);
10 changes: 5 additions & 5 deletions src/BUTR.CrashReport.Renderer/ICrashReportRendererUtilities.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
using System.Collections.Generic;
using BUTR.CrashReport.Models;

using BUTR.CrashReport.Models;
using System.Collections.Generic;

namespace BUTR.CrashReport.Renderer;

public interface ICrashReportRendererUtilities
{
IEnumerable<string> GetNativeLibrariesFolderPath();

void Upload(CrashReportModel crashReport, ICollection<LogSource> logSources);

void CopyAsHtml(CrashReportModel crashReport, ICollection<LogSource> logSources);

// TODO: Right now we rely on the implementation to provide a dialog and do the save
// We should instead do the dialog within ImGui and then provide here the path/stream of where to save the file
void SaveCrashReportAsHtml(CrashReportModel crashReport, ICollection<LogSource> logSources, bool addMiniDump, bool addLatestSave, bool addScreenshots);
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using BUTR.CrashReport.Renderer.UnsafeUtils;

using BUTR.CrashReport.Models;
using BUTR.CrashReport.Models;
using BUTR.CrashReport.Renderer.UnsafeUtils;

using System;
using System.Linq;
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using BUTR.CrashReport.Renderer.UnsafeUtils;

using BUTR.CrashReport.Models;
using BUTR.CrashReport.Models;
using BUTR.CrashReport.Renderer.UnsafeUtils;

using ImGuiNET;

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using BUTR.CrashReport.Renderer.Extensions;
using BUTR.CrashReport.Models;
using BUTR.CrashReport.Renderer.Extensions;
using BUTR.CrashReport.Renderer.UnsafeUtils;

using BUTR.CrashReport.Models;

using HonkPerf.NET.RefLinq;

using ImGuiNET;
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using BUTR.CrashReport.Renderer.Extensions;
using BUTR.CrashReport.Renderer.UnsafeUtils;

using BUTR.CrashReport.Extensions;
using BUTR.CrashReport.Extensions;
using BUTR.CrashReport.Models;
using BUTR.CrashReport.Renderer.Extensions;
using BUTR.CrashReport.Renderer.UnsafeUtils;

using ImGuiNET;

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using BUTR.CrashReport.Renderer.Extensions;
using BUTR.CrashReport.Models;
using BUTR.CrashReport.Renderer.Extensions;
using BUTR.CrashReport.Renderer.UnsafeUtils;
using BUTR.CrashReport.Renderer.Utils;

using BUTR.CrashReport.Models;

using HonkPerf.NET.Core;
using HonkPerf.NET.RefLinq;
using HonkPerf.NET.RefLinq.Enumerators;
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using BUTR.CrashReport.Renderer.Extensions;

using BUTR.CrashReport.Models;
using BUTR.CrashReport.Models;
using BUTR.CrashReport.Renderer.Extensions;

using HonkPerf.NET.RefLinq;

5 changes: 2 additions & 3 deletions src/BUTR.CrashReport.Renderer/Renderer/ImGuiRenderer.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using BUTR.CrashReport.Renderer.ImGui;
using BUTR.CrashReport.Models;
using BUTR.CrashReport.Renderer.ImGui;
using BUTR.CrashReport.Renderer.UnsafeUtils;

using BUTR.CrashReport.Models;

using ImGuiNET;

using System;

0 comments on commit cd4bb46

Please sign in to comment.