Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ protected override void EndProcessing()
}
}

internal class EventWriteException : Exception
internal sealed class EventWriteException : Exception
{
internal EventWriteException(string msg, Exception innerException)
: base(msg, innerException)
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.PowerShell.Commands.Diagnostics/PdhHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ internal struct CounterHandleNInstance
public string InstanceName;
}

internal class PdhHelper : IDisposable
internal sealed class PdhHelper : IDisposable
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
private struct PDH_COUNTER_PATH_ELEMENTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ protected static string GetLanguageName(uint? lcid)

#pragma warning disable 649 // fields and properties in these class are assigned dynamically
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Class is instantiated directly from a CIM instance")]
internal class WmiBaseBoard
internal sealed class WmiBaseBoard
{
public string Caption;
public string[] ConfigOptions;
Expand Down Expand Up @@ -1368,7 +1368,7 @@ internal class WmiBaseBoard
}

[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Class is instantiated directly from a CIM instance")]
internal class WmiBios : WmiClassBase
internal sealed class WmiBios : WmiClassBase
{
public ushort[] BiosCharacteristics;
public string[] BIOSVersion;
Expand Down Expand Up @@ -1403,7 +1403,7 @@ internal class WmiBios : WmiClassBase
}

[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Class is instantiated directly from a CIM instance")]
internal class WmiComputerSystem
internal sealed class WmiComputerSystem
{
public ushort? AdminPasswordStatus;
public bool? AutomaticManagedPagefile;
Expand Down Expand Up @@ -1486,7 +1486,7 @@ public PowerManagementCapabilities[] GetPowerManagementCapabilities()
}

[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Class is instantiated directly from a CIM instance")]
internal class WmiDeviceGuard
internal sealed class WmiDeviceGuard
{
public uint[] AvailableSecurityProperties;
public uint? CodeIntegrityPolicyEnforcementStatus;
Expand Down Expand Up @@ -1561,7 +1561,7 @@ public DeviceGuard AsOutputType
}

[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Class is instantiated directly from a CIM instance")]
internal class WmiKeyboard
internal sealed class WmiKeyboard
{
public ushort? Availability;
public string Caption;
Expand All @@ -1588,14 +1588,14 @@ internal class WmiKeyboard
}

[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Class is instantiated directly from a CIM instance")]
internal class WMiLogicalMemory
internal sealed class WMiLogicalMemory
{
// TODO: fill this in!!!
public uint? TotalPhysicalMemory;
}

[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Class is instantiated directly from a CIM instance")]
internal class WmiMsftNetAdapter
internal sealed class WmiMsftNetAdapter
{
public string Caption;
public string Description;
Expand Down Expand Up @@ -1683,7 +1683,7 @@ internal class WmiMsftNetAdapter
}

[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Class is instantiated directly from a CIM instance")]
internal class WmiNetworkAdapter
internal sealed class WmiNetworkAdapter
{
public string AdapterType;
public ushort? AdapterTypeID;
Expand Down Expand Up @@ -1727,7 +1727,7 @@ internal class WmiNetworkAdapter
}

[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Class is instantiated directly from a CIM instance")]
internal class WmiNetworkAdapterConfiguration
internal sealed class WmiNetworkAdapterConfiguration
{
public bool? ArpAlwaysSourceRoute;
public bool? ArpUseEtherSNAP;
Expand Down Expand Up @@ -1793,7 +1793,7 @@ internal class WmiNetworkAdapterConfiguration
}

[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Class is instantiated directly from a CIM instance")]
internal class WmiOperatingSystem : WmiClassBase
internal sealed class WmiOperatingSystem : WmiClassBase
{
#region Fields
public string BootDevice;
Expand Down Expand Up @@ -1900,7 +1900,7 @@ private static OSProductSuite[] MakeProductSuites(uint? suiteMask)
}

[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Class is instantiated directly from a CIM instance")]
internal class WmiPageFileUsage
internal sealed class WmiPageFileUsage
{
public uint? AllocatedBaseSize;
public string Caption;
Expand All @@ -1914,7 +1914,7 @@ internal class WmiPageFileUsage
}

[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Class is instantiated directly from a CIM instance")]
internal class WmiProcessor
internal sealed class WmiProcessor
{
public ushort? AddressWidth;
public ushort? Architecture;
Expand Down Expand Up @@ -1977,7 +1977,7 @@ internal class WmiProcessor
#endregion Intermediate WMI classes

#region Other Intermediate classes
internal class RegWinNtCurrentVersion
internal sealed class RegWinNtCurrentVersion
{
public string BuildLabEx;
public string CurrentVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2841,7 +2841,7 @@ internal struct PROCESS_INFORMATION
}

[StructLayout(LayoutKind.Sequential)]
internal class SECURITY_ATTRIBUTES
internal sealed class SECURITY_ATTRIBUTES
{
public int nLength;
public SafeLocalMemHandle lpSecurityDescriptor;
Expand Down Expand Up @@ -2879,7 +2879,7 @@ protected override bool ReleaseHandle()
}

[StructLayout(LayoutKind.Sequential)]
internal class STARTUPINFO
internal sealed class STARTUPINFO
{
public int cb;
public IntPtr lpReserved;
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.WSMan.Management/CurrentConfigurations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.WSMan.Management
/// Class that queries the server and gets current configurations.
/// Also provides a generic way to update the configurations.
/// </summary>
internal class CurrentConfigurations
internal sealed class CurrentConfigurations
{
/// <summary>
/// Prefix used to add NameSpace of root element to namespace manager.
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.WSMan.Management/WsManHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace Microsoft.WSMan.Management
{
[SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "0#")]
internal class WSManHelper
internal sealed class WSManHelper
{
// regular expressions
private const string PTRN_URI_LAST = @"([a-z_][-a-z0-9._]*)$";
Expand Down Expand Up @@ -89,7 +89,7 @@ internal class WSManHelper
//
//
// Below class is just a static container which would release sessions in case this DLL is unloaded.
internal class Sessions
internal sealed class Sessions
{
/// <summary>
/// Dictionary object to store the connection.
Expand Down
6 changes: 3 additions & 3 deletions test/xUnit/csharp/test_AstDefaultVisit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@

namespace PSTests.Parallel
{
internal class MyICustomAstVisitor2 : ICustomAstVisitor2
internal sealed class MyICustomAstVisitor2 : ICustomAstVisitor2
{
public object DefaultVisit(Ast ast) => ast.GetType().Name;
}

internal class MyDefaultCustomAstVisitor2 : DefaultCustomAstVisitor2
internal sealed class MyDefaultCustomAstVisitor2 : DefaultCustomAstVisitor2
{
public override object DefaultVisit(Ast ast) => ast.GetType().Name;
}

internal class MyAstVisitor2 : AstVisitor2
internal sealed class MyAstVisitor2 : AstVisitor2
{
public List<string> Commands { get; }

Expand Down
Loading