Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Shared
  • Loading branch information
BrennanConroy committed May 1, 2022
commit 43bdbfc582ed89bc83ede6d4b0f2bf9fcbb3cb50
2 changes: 1 addition & 1 deletion src/Shared/BenchmarkRunner/DefaultCoreConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace BenchmarkDotNet.Attributes;

internal class DefaultCoreConfig : ManualConfig
internal sealed class DefaultCoreConfig : ManualConfig
{
public DefaultCoreConfig()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/BenchmarkRunner/DefaultCoreDebugConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace BenchmarkDotNet.Attributes;

internal class DefaultCoreDebugConfig : ManualConfig
internal sealed class DefaultCoreDebugConfig : ManualConfig
{
public DefaultCoreDebugConfig()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/BenchmarkRunner/DefaultCorePerfLabConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace BenchmarkDotNet.Attributes;

internal class DefaultCorePerfLabConfig : ManualConfig
internal sealed class DefaultCorePerfLabConfig : ManualConfig
{
public DefaultCorePerfLabConfig()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/BenchmarkRunner/DefaultCoreProfileConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace BenchmarkDotNet.Attributes;

internal class DefaultCoreProfileConfig : ManualConfig
internal sealed class DefaultCoreProfileConfig : ManualConfig
{
public DefaultCoreProfileConfig()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/BenchmarkRunner/DefaultCoreValidationConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace BenchmarkDotNet.Attributes;

internal class DefaultCoreValidationConfig : ManualConfig
internal sealed class DefaultCoreValidationConfig : ManualConfig
{
public DefaultCoreValidationConfig()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace BenchmarkDotNet.Attributes;

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly)]
internal class ParameterizedJobConfigAttribute : AspNetCoreBenchmarkAttribute
internal sealed class ParameterizedJobConfigAttribute : AspNetCoreBenchmarkAttribute
{
public ParameterizedJobConfigAttribute(Type configType) : base(configType)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/BenchmarkRunner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace Microsoft.AspNetCore.BenchmarkDotNet.Runner;

partial class Program
sealed partial class Program
{
private static TextWriter _standardOutput;
private static StringBuilder _standardOutputText;
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/BrowserTesting/src/BrowserTestOutputLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Microsoft.AspNetCore.BrowserTesting;

internal class BrowserTestOutputLogger : ITestOutputHelper
internal sealed class BrowserTestOutputLogger : ITestOutputHelper
{
private readonly ILogger _logger;

Expand Down
2 changes: 1 addition & 1 deletion src/Shared/Buffers.MemoryPool/DiagnosticMemoryPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace System.Buffers;
/// <summary>
/// Used to allocate and distribute re-usable blocks of memory.
/// </summary>
internal class DiagnosticMemoryPool : MemoryPool<byte>
internal sealed class DiagnosticMemoryPool : MemoryPool<byte>
{
private readonly MemoryPool<byte> _pool;

Expand Down
4 changes: 2 additions & 2 deletions src/Shared/Buffers.MemoryPool/MemoryPoolThrowHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics;
Expand All @@ -7,7 +7,7 @@

namespace System.Buffers;

internal class MemoryPoolThrowHelper
internal sealed class MemoryPoolThrowHelper
{
public static void ThrowArgumentOutOfRangeException(int sourceLength, int offset)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/Buffers.Testing/BufferSegment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace System.Buffers;

internal class BufferSegment : ReadOnlySequenceSegment<byte>
internal sealed class BufferSegment : ReadOnlySequenceSegment<byte>
{
public BufferSegment(Memory<byte> memory)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/Buffers.Testing/CustomMemoryForTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace System.Buffers;

internal class CustomMemoryForTest<T> : IMemoryOwner<T>
internal sealed class CustomMemoryForTest<T> : IMemoryOwner<T>
{
private bool _disposed;
private T[] _array;
Expand Down
10 changes: 5 additions & 5 deletions src/Shared/Buffers.Testing/ReadOnlySequenceFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public ReadOnlySequence<byte> CreateWithContent(string data)
return CreateWithContent(Encoding.ASCII.GetBytes(data));
}

internal class ArrayTestSequenceFactory : ReadOnlySequenceFactory
internal sealed class ArrayTestSequenceFactory : ReadOnlySequenceFactory
{
public override ReadOnlySequence<byte> CreateOfSize(int size)
{
Expand All @@ -39,7 +39,7 @@ public override ReadOnlySequence<byte> CreateWithContent(byte[] data)
}
}

internal class MemoryTestSequenceFactory : ReadOnlySequenceFactory
internal sealed class MemoryTestSequenceFactory : ReadOnlySequenceFactory
{
public override ReadOnlySequence<byte> CreateOfSize(int size)
{
Expand All @@ -54,7 +54,7 @@ public override ReadOnlySequence<byte> CreateWithContent(byte[] data)
}
}

internal class OwnedMemoryTestSequenceFactory : ReadOnlySequenceFactory
internal sealed class OwnedMemoryTestSequenceFactory : ReadOnlySequenceFactory
{
public override ReadOnlySequence<byte> CreateOfSize(int size)
{
Expand All @@ -69,7 +69,7 @@ public override ReadOnlySequence<byte> CreateWithContent(byte[] data)
}
}

internal class SingleSegmentTestSequenceFactory : ReadOnlySequenceFactory
internal sealed class SingleSegmentTestSequenceFactory : ReadOnlySequenceFactory
{
public override ReadOnlySequence<byte> CreateOfSize(int size)
{
Expand All @@ -82,7 +82,7 @@ public override ReadOnlySequence<byte> CreateWithContent(byte[] data)
}
}

internal class BytePerSegmentTestSequenceFactory : ReadOnlySequenceFactory
internal sealed class BytePerSegmentTestSequenceFactory : ReadOnlySequenceFactory
{
public override ReadOnlySequence<byte> CreateOfSize(int size)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Shared/CertificateGeneration/CertificateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ internal static string GetDescription(X509Certificate2 c) =>
$"{c.Thumbprint} - {c.Subject} - Valid from {c.NotBefore:u} to {c.NotAfter:u} - IsHttpsDevelopmentCertificate: {IsHttpsDevelopmentCertificate(c).ToString().ToLowerInvariant()} - IsExportable: {Instance.IsExportable(c).ToString().ToLowerInvariant()}";

[EventSource(Name = "Dotnet-dev-certs")]
public class CertificateManagerEventSource : EventSource
public sealed class CertificateManagerEventSource : EventSource
{
[Event(1, Level = EventLevel.Verbose, Message = "Listing certificates from {0}\\{1}")]
[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Parameters passed to WriteEvent are all primative values.")]
Expand Down Expand Up @@ -969,7 +969,7 @@ public class CertificateManagerEventSource : EventSource
internal void NoHttpsDevelopmentCertificate(string description) => WriteEvent(64, description);
}

internal class UserCancelledTrustException : Exception
internal sealed class UserCancelledTrustException : Exception
{
}

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

namespace Microsoft.AspNetCore.Certificates.Generation;

internal class MacOSCertificateManager : CertificateManager
internal sealed class MacOSCertificateManager : CertificateManager
{
private const string CertificateSubjectRegex = "CN=(.*[^,]+).*";
private static readonly string MacOSUserKeyChain = Environment.GetEnvironmentVariable("HOME") + "/Library/Keychains/login.keychain-db";
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/CertificateGeneration/UnixCertificateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Microsoft.AspNetCore.Certificates.Generation;

internal class UnixCertificateManager : CertificateManager
internal sealed class UnixCertificateManager : CertificateManager
{
public UnixCertificateManager()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Microsoft.AspNetCore.Certificates.Generation;

[SupportedOSPlatform("windows")]
internal class WindowsCertificateManager : CertificateManager
internal sealed class WindowsCertificateManager : CertificateManager
{
private const int UserCancelledErrorCode = 1223;

Expand Down
2 changes: 1 addition & 1 deletion src/Shared/ChunkingCookieManager/ChunkingCookieManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace Microsoft.AspNetCore.Internal;
/// This handles cookies that are limited by per cookie length. It breaks down long cookies for responses, and reassembles them
/// from requests.
/// </summary>
internal class ChunkingCookieManager
internal sealed class ChunkingCookieManager
{
#endif
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/CommandLineUtils/CommandLine/AnsiConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.Extensions.CommandLineUtils;

internal class AnsiConsole
internal sealed class AnsiConsole
{
private AnsiConsole(TextWriter writer, bool useConsoleColor)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/CommandLineUtils/CommandLine/CommandArgument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.Extensions.CommandLineUtils;

internal class CommandArgument
internal sealed class CommandArgument
{
public CommandArgument()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

namespace Microsoft.Extensions.CommandLineUtils;

#pragma warning disable CA1852 // Seal internal types
internal class CommandLineApplication
#pragma warning restore CA1852 // Seal internal types
{
// Indicates whether the parser should throw an exception when it runs into an unexpected argument. If this is
// set to true (the default), the parser will throw on the first unexpected argument. Otherwise, all unexpected
Expand Down Expand Up @@ -53,7 +55,7 @@ public CommandLineApplication(bool throwOnUnexpectedArg = true, bool continueAft
public CommandOption OptionVersion { get; private set; }
public readonly List<CommandArgument> Arguments;
public readonly List<string> RemainingArguments;
public bool IsShowingInformation { get; protected set; } // Is showing help or version?
public bool IsShowingInformation { get; private set; } // Is showing help or version?
public Func<int> Invoke { get; set; }
public Func<string> LongVersionGetter { get; set; }
public Func<string> ShortVersionGetter { get; set; }
Expand Down Expand Up @@ -434,7 +436,7 @@ public void ShowHelp(string commandName = null)
Out.WriteLine(GetHelpText(commandName));
}

public virtual string GetHelpText(string commandName = null)
public string GetHelpText(string commandName = null)
{
var headerBuilder = new StringBuilder("Usage:");
for (var cmd = this; cmd != null; cmd = cmd.Parent)
Expand Down Expand Up @@ -596,7 +598,7 @@ private bool HandleUnexpectedArg(
}
}

private class CommandArgumentEnumerator : IEnumerator<CommandArgument>
private sealed class CommandArgumentEnumerator : IEnumerator<CommandArgument>
{
private readonly IEnumerator<CommandArgument> _enumerator;

Expand Down
2 changes: 1 addition & 1 deletion src/Shared/CommandLineUtils/CommandLine/CommandOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Microsoft.Extensions.CommandLineUtils;

internal class CommandOption
internal sealed class CommandOption
{
public CommandOption(string template, CommandOptionType optionType)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Microsoft.Extensions.CommandLineUtils;

internal class CommandParsingException : Exception
internal sealed class CommandParsingException : Exception
{
public CommandParsingException(CommandLineApplication command, string message)
: base(message)
Expand Down
2 changes: 2 additions & 0 deletions src/Shared/Components/PrerenderComponentApplicationStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

namespace Microsoft.AspNetCore.Components;

#pragma warning disable CA1852 // Seal internal types
internal class PrerenderComponentApplicationStore : IPersistentComponentStateStore
#pragma warning restore CA1852 // Seal internal types
{
public PrerenderComponentApplicationStore()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Microsoft.AspNetCore.Components;

internal class ProtectedPrerenderComponentApplicationStore : PrerenderComponentApplicationStore
internal sealed class ProtectedPrerenderComponentApplicationStore : PrerenderComponentApplicationStore
{
private IDataProtector _protector;

Expand Down
Loading