Skip to content

Commit

Permalink
refactor: move DebugImage and DebugMeta to Protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Nov 9, 2023
1 parent 3d0eb8b commit 904f26d
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 62 deletions.
1 change: 1 addition & 0 deletions src/Sentry/Internal/DebugStackTrace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Sentry.Extensibility;
using Sentry.Native;
using Sentry.Internal.ILSpy;
using Sentry.Protocol;

namespace Sentry.Internal;

Expand Down
1 change: 1 addition & 0 deletions src/Sentry/Internal/Extensions/PEReaderExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Sentry.Extensibility;
using Sentry.Protocol;

namespace Sentry.Internal.Extensions;

Expand Down
1 change: 1 addition & 0 deletions src/Sentry/Internal/ILSpy/SingleFileApp.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Sentry.Extensibility;
using Sentry.Internal.Extensions;
using Sentry.Protocol;

namespace Sentry.Internal.ILSpy;

Expand Down
1 change: 1 addition & 0 deletions src/Sentry/Platforms/Native/CFunctions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Sentry.Extensibility;
using Sentry.Internal.Extensions;
using Sentry.Protocol;

namespace Sentry.Native;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Sentry.Extensibility;
using Sentry.Internal.Extensions;

namespace Sentry;
namespace Sentry.Protocol;

/// <summary>
/// The Sentry Debug Meta Images interface.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Sentry.Extensibility;
using Sentry.Internal.Extensions;

namespace Sentry;
namespace Sentry.Protocol;

/// <summary>
/// The Sentry Debug Meta interface.
Expand Down
30 changes: 15 additions & 15 deletions test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,6 @@ namespace Sentry
Managed = 0,
ManagedBackgroundThread = 1,
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
[System.Flags]
public enum DeduplicateMode
{
Expand Down Expand Up @@ -517,7 +503,7 @@ namespace Sentry
public SentryEvent(System.Exception? exception) { }
public System.Collections.Generic.IReadOnlyCollection<Sentry.Breadcrumb> Breadcrumbs { get; }
public Sentry.Contexts Contexts { get; set; }
public System.Collections.Generic.List<Sentry.DebugImage>? DebugImages { get; set; }
public System.Collections.Generic.List<Sentry.Protocol.DebugImage>? DebugImages { get; set; }
public string? Distribution { get; set; }
public string? Environment { get; set; }
public Sentry.SentryId EventId { get; }
Expand Down Expand Up @@ -1502,6 +1488,20 @@ namespace Sentry.Protocol
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { }
public static Sentry.Protocol.Browser FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.Protocol.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class Device : Sentry.IJsonSerializable
{
public const string Type = "device";
Expand Down
30 changes: 15 additions & 15 deletions test/Sentry.Tests/ApiApprovalTests.Run.DotNet7_0.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,6 @@ namespace Sentry
Managed = 0,
ManagedBackgroundThread = 1,
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
[System.Flags]
public enum DeduplicateMode
{
Expand Down Expand Up @@ -517,7 +503,7 @@ namespace Sentry
public SentryEvent(System.Exception? exception) { }
public System.Collections.Generic.IReadOnlyCollection<Sentry.Breadcrumb> Breadcrumbs { get; }
public Sentry.Contexts Contexts { get; set; }
public System.Collections.Generic.List<Sentry.DebugImage>? DebugImages { get; set; }
public System.Collections.Generic.List<Sentry.Protocol.DebugImage>? DebugImages { get; set; }
public string? Distribution { get; set; }
public string? Environment { get; set; }
public Sentry.SentryId EventId { get; }
Expand Down Expand Up @@ -1502,6 +1488,20 @@ namespace Sentry.Protocol
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { }
public static Sentry.Protocol.Browser FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.Protocol.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class Device : Sentry.IJsonSerializable
{
public const string Type = "device";
Expand Down
30 changes: 15 additions & 15 deletions test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,6 @@ namespace Sentry
Managed = 0,
ManagedBackgroundThread = 1,
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
[System.Flags]
public enum DeduplicateMode
{
Expand Down Expand Up @@ -517,7 +503,7 @@ namespace Sentry
public SentryEvent(System.Exception? exception) { }
public System.Collections.Generic.IReadOnlyCollection<Sentry.Breadcrumb> Breadcrumbs { get; }
public Sentry.Contexts Contexts { get; set; }
public System.Collections.Generic.List<Sentry.DebugImage>? DebugImages { get; set; }
public System.Collections.Generic.List<Sentry.Protocol.DebugImage>? DebugImages { get; set; }
public string? Distribution { get; set; }
public string? Environment { get; set; }
public Sentry.SentryId EventId { get; }
Expand Down Expand Up @@ -1502,6 +1488,20 @@ namespace Sentry.Protocol
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { }
public static Sentry.Protocol.Browser FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.Protocol.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class Device : Sentry.IJsonSerializable
{
public const string Type = "device";
Expand Down
30 changes: 15 additions & 15 deletions test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,6 @@ namespace Sentry
Managed = 0,
ManagedBackgroundThread = 1,
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
[System.Flags]
public enum DeduplicateMode
{
Expand Down Expand Up @@ -516,7 +502,7 @@ namespace Sentry
public SentryEvent(System.Exception? exception) { }
public System.Collections.Generic.IReadOnlyCollection<Sentry.Breadcrumb> Breadcrumbs { get; }
public Sentry.Contexts Contexts { get; set; }
public System.Collections.Generic.List<Sentry.DebugImage>? DebugImages { get; set; }
public System.Collections.Generic.List<Sentry.Protocol.DebugImage>? DebugImages { get; set; }
public string? Distribution { get; set; }
public string? Environment { get; set; }
public Sentry.SentryId EventId { get; }
Expand Down Expand Up @@ -1500,6 +1486,20 @@ namespace Sentry.Protocol
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? _) { }
public static Sentry.Protocol.Browser FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class DebugImage : Sentry.IJsonSerializable
{
public DebugImage() { }
public string? CodeFile { get; set; }
public string? CodeId { get; set; }
public string? DebugChecksum { get; set; }
public string? DebugFile { get; set; }
public string? DebugId { get; set; }
public long? ImageAddress { get; set; }
public long? ImageSize { get; set; }
public string? Type { get; set; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
public static Sentry.Protocol.DebugImage FromJson(System.Text.Json.JsonElement json) { }
}
public sealed class Device : Sentry.IJsonSerializable
{
public const string Type = "device";
Expand Down

0 comments on commit 904f26d

Please sign in to comment.