Thanks to visit codestin.com
Credit goes to github.com

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 @@ -321,7 +321,7 @@ internal static class ConvertHTMLParameterDefinitionKeys
/// <summary>
/// This allows for @{e='foo';label='bar';alignment='center';width='20'}.
/// </summary>
internal class ConvertHTMLExpressionParameterDefinition : CommandParameterDefinition
internal sealed class ConvertHTMLExpressionParameterDefinition : CommandParameterDefinition
{
protected override void SetEntries()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// This class is used to parse CSV text.
/// </summary>
internal class CSVHelper
internal sealed class CSVHelper
{
internal CSVHelper(char delimiter)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ protected override void ProcessRecord()
/// <summary>
/// Helper class for Export-Csv and ConvertTo-Csv.
/// </summary>
internal class ExportCsvHelper : IDisposable
internal sealed class ExportCsvHelper : IDisposable
{
private readonly char _delimiter;
private readonly BaseCsvWritingCommand.QuoteKind _quoteKind;
Expand Down Expand Up @@ -1224,7 +1224,7 @@ public void Dispose()
/// <summary>
/// Helper class to import single CSV file.
/// </summary>
internal class ImportCsvHelper
internal sealed class ImportCsvHelper
{
#region constructor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace System.Management.Automation
/// <summary>
/// This class provides functionality for serializing a PSObject.
/// </summary>
internal class CustomSerialization
internal sealed class CustomSerialization
{
#region constructor
/// <summary>
Expand Down Expand Up @@ -179,8 +179,7 @@ internal void Stop()
/// <summary>
/// This internal helper class provides methods for serializing mshObject.
/// </summary>
internal class
CustomInternalSerializer
internal sealed class CustomInternalSerializer
{
#region constructor

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

namespace Microsoft.PowerShell.Commands
{
internal class ExpressionColumnInfo : ColumnInfo
internal sealed class ExpressionColumnInfo : ColumnInfo
{
private readonly PSPropertyExpression _expression;

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

namespace Microsoft.PowerShell.Commands
{
internal class HeaderInfo
internal sealed class HeaderInfo
{
private readonly List<ColumnInfo> _columns = new();

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

namespace Microsoft.PowerShell.Commands
{
internal class OriginalColumnInfo : ColumnInfo
internal sealed class OriginalColumnInfo : ColumnInfo
{
private readonly string _liveObjectPropertyName;
private readonly OutGridViewCommand _parentCmdlet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ internal static GridHeader ConstructGridHeader(PSObject input, OutGridViewComman
internal abstract void ProcessInputObject(PSObject input);
}

internal class ScalarTypeHeader : GridHeader
internal sealed class ScalarTypeHeader : GridHeader
{
private readonly Type _originalScalarType;

Expand All @@ -349,7 +349,7 @@ internal override void ProcessInputObject(PSObject input)
}
}

internal class NonscalarTypeHeader : GridHeader
internal sealed class NonscalarTypeHeader : GridHeader
{
private readonly AppliesTo _appliesTo = null;

Expand Down Expand Up @@ -453,7 +453,7 @@ internal override void ProcessInputObject(PSObject input)
}
}

internal class HeteroTypeHeader : GridHeader
internal sealed class HeteroTypeHeader : GridHeader
{
internal HeteroTypeHeader(OutGridViewCommand parentCmd, PSObject input) : base(parentCmd)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Microsoft.PowerShell.Commands
{
internal class OutWindowProxy : IDisposable
internal sealed class OutWindowProxy : IDisposable
{
private const string OutGridViewWindowClassName = "Microsoft.Management.UI.Internal.OutGridViewWindow";
private const string OriginalTypePropertyName = "OriginalType";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Microsoft.PowerShell.Commands
{
internal class ScalarTypeColumnInfo : ColumnInfo
internal sealed class ScalarTypeColumnInfo : ColumnInfo
{
private readonly Type _type;

Expand All @@ -29,7 +29,7 @@ internal override object GetValue(PSObject liveObject)
}
}

internal class TypeNameColumnInfo : ColumnInfo
internal sealed class TypeNameColumnInfo : ColumnInfo
{
internal TypeNameColumnInfo(string staleObjectPropertyName, string displayName)
: base(staleObjectPropertyName, displayName)
Expand All @@ -43,7 +43,7 @@ internal override object GetValue(PSObject liveObject)
}
}

internal class ToStringColumnInfo : ColumnInfo
internal sealed class ToStringColumnInfo : ColumnInfo
{
private readonly OutGridViewCommand _parentCmdlet;

Expand All @@ -60,7 +60,7 @@ internal override object GetValue(PSObject liveObject)
}
}

internal class IndexColumnInfo : ColumnInfo
internal sealed class IndexColumnInfo : ColumnInfo
{
private int _index = 0;

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

namespace Microsoft.PowerShell.Commands
{
internal class TableView
internal sealed class TableView
{
private PSPropertyExpressionFactory _expressionFactory;
private TypeInfoDataBase _typeInfoDatabase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ protected override void EndProcessing()
/// methods using the NextBytes() primitive based on the CLR implementation:
/// https://referencesource.microsoft.com/#mscorlib/system/random.cs.
/// </summary>
internal class PolymorphicRandomNumberGenerator
internal sealed class PolymorphicRandomNumberGenerator
{
/// <summary>
/// Initializes a new instance of the <see cref="PolymorphicRandomNumberGenerator"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,7 @@ internal List<string> GenerateProxyModule(
#endregion
}

internal class ImplicitRemotingCodeGenerator
internal sealed class ImplicitRemotingCodeGenerator
{
internal static readonly Version VersionOfScriptWriter = new(1, 0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.PowerShell.Commands;
/// Thrown during evaluation of <see cref="TestJsonCommand"/> when an attempt
/// to resolve a <code>$ref</code> or <code>$dynamicRef</code> fails.
/// </summary>
internal class JsonSchemaReferenceResolutionException : Exception
internal sealed class JsonSchemaReferenceResolutionException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="JsonSchemaReferenceResolutionException"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Microsoft.PowerShell.Commands
/// isExistingProperty is needed to distinguish whether a property exists and its value is null or
/// the property does not exist at all.
/// </summary>
internal class ObjectCommandPropertyValue
internal sealed class ObjectCommandPropertyValue
{
private ObjectCommandPropertyValue() { }

Expand Down Expand Up @@ -136,7 +136,7 @@ public override int GetHashCode()
/// <summary>
/// ObjectCommandComparer class.
/// </summary>
internal class ObjectCommandComparer : IComparer
internal sealed class ObjectCommandComparer : IComparer
{
/// <summary>
/// Initializes a new instance of the <see cref="ObjectCommandComparer"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal static class SortObjectParameterDefinitionKeys

/// <summary>
/// </summary>
internal class SortObjectExpressionParameterDefinition : CommandParameterDefinition
internal sealed class SortObjectExpressionParameterDefinition : CommandParameterDefinition
{
protected override void SetEntries()
{
Expand All @@ -36,7 +36,7 @@ protected override void SetEntries()

/// <summary>
/// </summary>
internal class GroupObjectExpressionParameterDefinition : CommandParameterDefinition
internal sealed class GroupObjectExpressionParameterDefinition : CommandParameterDefinition
{
protected override void SetEntries()
{
Expand Down Expand Up @@ -630,7 +630,7 @@ internal sealed class OrderByPropertyEntry
internal bool comparable = false;
}

internal class OrderByPropertyComparer : IComparer<OrderByPropertyEntry>
internal sealed class OrderByPropertyComparer : IComparer<OrderByPropertyEntry>
{
internal OrderByPropertyComparer(bool[] ascending, CultureInfo cultureInfo, bool caseSensitive)
{
Expand Down Expand Up @@ -699,7 +699,7 @@ internal static OrderByPropertyComparer CreateComparer(List<OrderByPropertyEntry
private readonly ObjectCommandComparer[] _propertyComparers = null;
}

internal class IndexedOrderByPropertyComparer : IComparer<OrderByPropertyEntry>
internal sealed class IndexedOrderByPropertyComparer : IComparer<OrderByPropertyEntry>
{
internal IndexedOrderByPropertyComparer(OrderByPropertyComparer orderByPropertyComparer)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ internal bool IsMatch(PSPropertyExpression expression)
private readonly WildcardPattern[] _wildcardPatterns;
}

internal class SelectObjectExpressionParameterDefinition : CommandParameterDefinition
internal sealed class SelectObjectExpressionParameterDefinition : CommandParameterDefinition
{
protected override void SetEntries()
{
Expand Down Expand Up @@ -866,7 +866,7 @@ protected override void EndProcessing()
[SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable", Justification = "This exception is internal and never thrown by any public API")]
[SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification = "This exception is internal and never thrown by any public API")]
[SuppressMessage("Microsoft.Design", "CA1064:ExceptionsShouldBePublic", Justification = "This exception is internal and never thrown by any public API")]
internal class SelectObjectException : SystemException
internal sealed class SelectObjectException : SystemException
{
internal ErrorRecord ErrorRecord { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Microsoft.PowerShell.Commands
/// Help show-command create WPF object and invoke WPF windows with the
/// Microsoft.PowerShell.Commands.ShowCommandInternal.ShowCommandHelperhelp type defined in Microsoft.PowerShell.GraphicalHost.dll.
/// </summary>
internal class ShowCommandProxy
internal sealed class ShowCommandProxy
{
private const string ShowCommandHelperName = "Microsoft.PowerShell.Commands.ShowCommandInternal.ShowCommandHelper";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public enum RestReturnType
Xml,
}

internal class BufferingStreamReader : Stream
internal sealed class BufferingStreamReader : Stream
{
internal BufferingStreamReader(Stream baseStream, TimeSpan perReadTimeout, CancellationToken cancellationToken)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Microsoft.PowerShell.Commands
{
internal class WebProxy : IWebProxy, IEquatable<WebProxy>
internal sealed class WebProxy : IWebProxy, IEquatable<WebProxy>
{
private ICredentials? _credentials;
private readonly Uri _proxyAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Microsoft.PowerShell.Commands
/// this class as a wrapper to MemoryStream to lazily initialize. Otherwise, the
/// content will unnecessarily be read even if there are no consumers for it.
/// </summary>
internal class WebResponseContentMemoryStream : MemoryStream
internal sealed class WebResponseContentMemoryStream : MemoryStream
{
#region Data

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ protected override void ProcessRecord()
/// <summary>
/// Helper class to import single XML file.
/// </summary>
internal class ImportXmlHelper : IDisposable
internal sealed class ImportXmlHelper : IDisposable
{
#region constructor

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Microsoft.PowerShell.Commands
/// This trace listener cannot be specified in the app.config file.
/// It must be added through the add-tracelistener cmdlet.
/// </remarks>
internal class PSHostTraceListener
internal sealed class PSHostTraceListener
: System.Diagnostics.TraceListener
{
#region TraceListener constructors and disposer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public void Dispose()
/// cmdlet. It gets attached to the sub-pipelines success or error pipeline and redirects
/// all objects written to these pipelines to trace-command pipeline.
/// </summary>
internal class TracePipelineWriter : PipelineWriter
internal sealed class TracePipelineWriter : PipelineWriter
{
internal TracePipelineWriter(
TraceListenerCommandBase cmdlet,
Expand Down
Loading