Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ref: remove file-scoped namespace declaration
  • Loading branch information
Flash0ver committed Jul 9, 2025
commit 8b4ccf803f55d74e4d7dbaa06f058fa04c5db9c0
19 changes: 10 additions & 9 deletions src/Sentry.SourceGenerators/BuildPropertySourceGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ public void Execute(GeneratorExecutionContext context)
// </auto-generated>

#if NET8_0_OR_GREATER
namespace Sentry.Generated;

[global::System.Runtime.CompilerServices.CompilerGenerated]
public static class BuildPropertyInitializer
namespace Sentry.Generated
{
[global::System.Runtime.CompilerServices.ModuleInitializer]
public static void Initialize()
[global::System.Runtime.CompilerServices.CompilerGenerated]
public static class BuildPropertyInitializer
{
global::Sentry.CompilerServices.BuildProperties.Initialize(new global::System.Collections.Generic.Dictionary<string, string>(global::System.StringComparer.OrdinalIgnoreCase)
[global::System.Runtime.CompilerServices.ModuleInitializer]
public static void Initialize()
{
global::Sentry.CompilerServices.BuildProperties.Initialize(new global::System.Collections.Generic.Dictionary<string, string>(global::System.StringComparer.OrdinalIgnoreCase)
{

"""
);
Expand All @@ -75,14 +75,15 @@ public static void Initialize()
var pn = EscapeString(property.Replace("build_property.", ""));
var ev = EscapeString(value);
sb
.Append($"{tabString}{tabString}{tabString}{{")
.Append($"{tabString}{tabString}{tabString}{tabString}{{")
.Append($"\"{pn}\", \"{ev}\"")
.AppendLine("},");
}
}

sb
.AppendLine($"{tabString}{tabString}}});") // close dictionary
.AppendLine($"{tabString}{tabString}{tabString}}});") // close dictionary
.AppendLine($"{tabString}{tabString}}}")
.AppendLine($"{tabString}}}")
.AppendLine("}")
.AppendLine("#endif");
Expand Down
Loading