Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use static for classes with all static members #5485

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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