Skip to content

Commit

Permalink
use static for classes with all static members (#5485)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Sep 9, 2024
1 parent d10b79e commit d8caaec
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.AWS/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

namespace Aspire.Hosting.AWS;
internal sealed class Constants
internal static class Constants
{

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Aspire.Hosting.Azure;
/// <summary>
/// Provides helper methods for working with user secrets in a location outside of source control.
/// </summary>
internal sealed class UserSecretsPathHelper
internal static class UserSecretsPathHelper
{
internal const string SecretsFileName = "secrets.json";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Aspire.Hosting.Testing;

internal sealed class DistributedApplicationEntryPointInvoker
internal static class DistributedApplicationEntryPointInvoker
{
// This helpers encapsulates all of the complex logic required to:
// 1. Execute the entry point of the specified assembly in a different thread.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Aspire.Confluent.Kafka;

internal sealed class ConfluentKafkaCommon
internal static class ConfluentKafkaCommon
{
public const string MeterName = "Aspire.Confluent.Kafka";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.Extensions.ServiceDiscovery.Configuration;

internal sealed partial class ConfigurationServiceEndpointProvider
{
private sealed partial class Log
private static partial class Log
{
[LoggerMessage(1, LogLevel.Debug, "Skipping endpoint resolution for service '{ServiceName}': '{Reason}'.", EventName = "SkippedResolution")]
public static partial void SkippedResolution(ILogger logger, string serviceName, string reason);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Microsoft.Extensions.ServiceDiscovery.PassThrough;

internal sealed partial class PassThroughServiceEndpointProvider
{
private sealed partial class Log
private static partial class Log
{
[LoggerMessage(1, LogLevel.Debug, "Using pass-through service endpoint provider for service '{ServiceName}'.", EventName = "UsingPassThrough")]
internal static partial void UsingPassThrough(ILogger logger, string serviceName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Microsoft.Extensions.ServiceDiscovery;

partial class ServiceEndpointWatcher
{
private sealed partial class Log
private static partial class Log
{
[LoggerMessage(1, LogLevel.Debug, "Resolving endpoints for service '{ServiceName}'.", EventName = "ResolvingEndpoints")]
public static partial void ResolvingEndpoints(ILogger logger, string serviceName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Microsoft.Extensions.ServiceDiscovery;

partial class ServiceEndpointWatcherFactory
{
private sealed partial class Log
private static partial class Log
{
[LoggerMessage(1, LogLevel.Debug, "Creating endpoint resolver for service '{ServiceName}' with {Count} providers: {Providers}.", EventName = "CreatingResolver")]
public static partial void ServiceEndpointProviderListCore(ILogger logger, string serviceName, int count, string providers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace OpenTelemetry.Instrumentation.SqlClient.Implementation;
/// Helper class to hold common properties used by both SqlClientDiagnosticListener on .NET Core
/// and SqlEventSourceListener on .NET Framework.
/// </summary>
internal sealed class SqlActivitySourceHelper
internal static class SqlActivitySourceHelper
{
public const string MicrosoftSqlServerDatabaseSystemName = "mssql";

Expand Down

0 comments on commit d8caaec

Please sign in to comment.