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
1 change: 0 additions & 1 deletion src/Microsoft.PowerShell.Commands.Diagnostics/PdhHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ public void Dispose()
/// <param name="strNative"></param>
/// <param name="strSize"></param>
/// <param name="strColl"></param>

private void ReadPdhMultiString(ref IntPtr strNative, Int32 strSize, ref StringCollection strColl)
{
Debug.Assert(strSize >= 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,6 @@ private void ProcessWSManProtocol(object[] flags)
/// workgroup computer. Use this command to rename domain workstations and local
/// machines only. It cannot be used to rename Domain Controllers.
/// </summary>

[Cmdlet(VerbsCommon.Rename, "Computer", SupportsShouldProcess = true,
HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2097054", RemotingCapability = RemotingCapability.SupportedByCommand)]
public class RenameComputerCommand : PSCmdlet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@ public SwitchParameter IncludeUserName
///<summary>
/// To display the modules of a process.
///</summary>

[Parameter(ParameterSetName = NameParameterSet)]
[Parameter(ParameterSetName = IdParameterSet)]
[Parameter(ParameterSetName = InputObjectParameterSet)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Base class for a variety of commandlets that take color parameters.
/// </summary>

public
class ConsoleColorCmdlet : PSCmdlet
{
Expand All @@ -26,7 +25,6 @@ public ConsoleColorCmdlet()
/// The -ForegroundColor parameter.
/// </summary>
/// <value></value>

[Parameter]
public
ConsoleColor
Expand Down Expand Up @@ -60,7 +58,6 @@ public ConsoleColorCmdlet()
/// <summary>
/// </summary>
/// <value></value>

[Parameter]
public
ConsoleColor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Class comment.
/// </summary>

[Cmdlet(VerbsData.ConvertTo, "Html", DefaultParameterSetName = "Page",
HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2096595", RemotingCapability = RemotingCapability.None)]
public sealed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public abstract class BaseCsvWritingCommand : PSCmdlet
/// Abstract Property - Input Object which is written in Csv format.
/// Derived as Different Attributes.In ConvertTo-CSV, This is a positional parameter. Export-CSV not a Positional behaviour.
/// </summary>

public abstract PSObject InputObject { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,6 @@ private void WriteObjectString(
/// <param name="property">Name of property. Pass null for item.</param>
/// <param name="source">Object to be written.</param>
/// <param name="entry">Serialization information about source.</param>

private void WriteOnePrimitiveKnownType(
XmlWriter writer, string property, object source, TypeSerializationInfo entry)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Writes the PSHost object to the success stream.
/// </summary>

[Cmdlet(VerbsCommon.Get, "Host", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2097110", RemotingCapability = RemotingCapability.None)]
[OutputType(typeof(System.Management.Automation.Host.PSHost))]
public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ public V EnsureEntry(string key)
/// to maintain two sets of MeasureInfo and constantly checking
/// what mode we're in.
/// </summary>

[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
private class Statistics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Retrieves input from the host virtual console and writes it to the pipeline output.
/// </summary>

[Cmdlet(VerbsCommunications.Read, "Host", DefaultParameterSetName = "AsString", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2096610")]
[OutputType(typeof(string), typeof(SecureString))]
public sealed class ReadHostCommand : PSCmdlet
{
/// <summary>
/// Constructs a new instance.
/// </summary>

public
ReadHostCommand()
{
Expand All @@ -36,7 +34,6 @@ public sealed class ReadHostCommand : PSCmdlet
/// <summary>
/// The objects to display on the host before collecting input.
/// </summary>

[Parameter(Position = 0, ValueFromRemainingArguments = true)]
[AllowNull]
public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace Microsoft.PowerShell.Commands
/// Base class for all variable commands.
/// Because -Scope is defined in VariableCommandBase, all derived commands must implement -Scope.
/// </summary>

public abstract class VariableCommandBase : PSCmdlet
{
#region Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,6 @@ internal bool StaMode
/// <param name="args">
/// The command line parameters to be processed.
/// </param>

internal void Parse(string[] args)
{
Dbg.Assert(!_dirty, "This instance has already been used. Create a new instance.");
Expand Down
23 changes: 0 additions & 23 deletions src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ namespace Microsoft.PowerShell
/// Class ConsoleControl is used to wrap the various win32 console APIs 1:1 (i.e. at a low level, without attempting to be a
/// "true" object-oriented library.
/// </summary>

internal static class ConsoleControl
{
#if !UNIX
Expand Down Expand Up @@ -481,7 +480,6 @@ internal static void SetConsoleMode(ProcessWindowStyle style)
/// <summary>
/// Types of control ConsoleBreakSignals received by break Win32Handler delegates.
/// </summary>

internal enum ConsoleBreakSignal : uint
{
// These correspond to the CRTL_XXX_EVENT #defines in public/sdk/inc/wincon.h
Expand Down Expand Up @@ -511,7 +509,6 @@ internal enum ConsoleBreakSignal : uint
/// <exception cref="HostException">
/// If Win32's SetConsoleCtrlHandler fails
/// </exception>

internal static void AddBreakHandler(BreakHandler handlerDelegate)
{
bool result = NativeMethods.SetConsoleCtrlHandler(handlerDelegate, true);
Expand All @@ -532,7 +529,6 @@ internal static void AddBreakHandler(BreakHandler handlerDelegate)
/// <exception cref="HostException">
/// If Win32's SetConsoleCtrlHandler fails
/// </exception>

internal static void RemoveBreakHandler()
{
bool result = NativeMethods.SetConsoleCtrlHandler(null, false);
Expand Down Expand Up @@ -657,7 +653,6 @@ internal enum ConsoleModes : uint
/// <exception cref="HostException">
/// If Win32's GetConsoleMode fails
/// </exception>

internal static ConsoleModes GetMode(ConsoleHandle consoleHandle)
{
Dbg.Assert(!consoleHandle.IsInvalid, "consoleHandle is not valid");
Expand Down Expand Up @@ -690,7 +685,6 @@ internal static ConsoleModes GetMode(ConsoleHandle consoleHandle)
/// <exception cref="HostException">
/// If Win32's SetConsoleMode fails
/// </exception>

internal static void SetMode(ConsoleHandle consoleHandle, ConsoleModes mode)
{
Dbg.Assert(!consoleHandle.IsInvalid, "consoleHandle is not valid");
Expand Down Expand Up @@ -740,7 +734,6 @@ internal static void SetMode(ConsoleHandle consoleHandle, ConsoleModes mode)
/// <exception cref="HostException">
/// If Win32's ReadConsole fails
/// </exception>

internal static string ReadConsole(
ConsoleHandle consoleHandle,
int initialContentLength,
Expand Down Expand Up @@ -813,7 +806,6 @@ internal static string ReadConsole(
/// <exception cref="HostException">
/// If Win32's ReadConsoleInput fails
/// </exception>

internal static int ReadConsoleInput(ConsoleHandle consoleHandle, ref INPUT_RECORD[] buffer)
{
Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid");
Expand Down Expand Up @@ -853,7 +845,6 @@ internal static int ReadConsoleInput(ConsoleHandle consoleHandle, ref INPUT_RECO
/// <exception cref="HostException">
/// If Win32's PeekConsoleInput fails
/// </exception>

internal static int PeekConsoleInput
(
ConsoleHandle consoleHandle,
Expand Down Expand Up @@ -895,7 +886,6 @@ ref INPUT_RECORD[] buffer
/// <exception cref="HostException">
/// If Win32's GetNumberOfConsoleInputEvents fails
/// </exception>

internal static int GetNumberOfConsoleInputEvents(ConsoleHandle consoleHandle)
{
Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid");
Expand Down Expand Up @@ -989,7 +979,6 @@ internal static CONSOLE_SCREEN_BUFFER_INFO GetConsoleScreenBufferInfo(ConsoleHan
/// <exception cref="HostException">
/// If Win32's SetConsoleScreenBufferSize fails
/// </exception>

internal static void SetConsoleScreenBufferSize(ConsoleHandle consoleHandle, Size newSize)
{
Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid");
Expand Down Expand Up @@ -1078,7 +1067,6 @@ internal static WORD ColorToWORD(ConsoleColor foreground, ConsoleColor backgroun
/// <exception cref="ArgumentException">
/// If it is illegal to write <paramref name="contents"/> to the output buffer
/// </exception>

internal static void WriteConsoleOutput(ConsoleHandle consoleHandle, Coordinates origin, BufferCell[,] contents)
{
Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid");
Expand Down Expand Up @@ -1705,7 +1693,6 @@ private static void WriteConsoleOutputPlain(ConsoleHandle consoleHandle, Coordin
/// <exception cref="HostException">
/// If there is not enough memory to complete calls to Win32's ReadConsoleOutput
/// </exception>

internal static void ReadConsoleOutput
(
ConsoleHandle consoleHandle,
Expand Down Expand Up @@ -2379,7 +2366,6 @@ Coordinates origin
/// <exception cref="HostException">
/// If Win32's ScrollConsoleScreenBuffer fails
/// </exception>

internal static void ScrollConsoleScreenBuffer
(
ConsoleHandle consoleHandle,
Expand Down Expand Up @@ -2430,7 +2416,6 @@ internal static void ScrollConsoleScreenBuffer
/// <exception cref="HostException">
/// If Win32's SetConsoleWindowInfo fails
/// </exception>

internal static void SetConsoleWindowInfo(ConsoleHandle consoleHandle, bool absolute, SMALL_RECT windowInfo)
{
Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid");
Expand Down Expand Up @@ -2460,7 +2445,6 @@ internal static void SetConsoleWindowInfo(ConsoleHandle consoleHandle, bool abso
/// <exception cref="HostException">
/// If Win32's GetLargestConsoleWindowSize fails
/// </exception>

internal static Size GetLargestConsoleWindowSize(ConsoleHandle consoleHandle)
{
Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid");
Expand Down Expand Up @@ -2490,7 +2474,6 @@ internal static Size GetLargestConsoleWindowSize(ConsoleHandle consoleHandle)
/// <exception cref="HostException">
/// If Win32's GetConsoleTitle fails
/// </exception>

internal static string GetConsoleWindowTitle()
{
const int MaxWindowTitleLength = 1024;
Expand Down Expand Up @@ -2522,7 +2505,6 @@ internal static string GetConsoleWindowTitle()
/// <exception cref="HostException">
/// If Win32's SetConsoleTitle fails
/// </exception>

internal static void SetConsoleWindowTitle(string consoleTitle)
{
bool result = NativeMethods.SetConsoleTitle(consoleTitle);
Expand Down Expand Up @@ -2643,7 +2625,6 @@ private static void WriteConsole(ConsoleHandle consoleHandle, ReadOnlySpan<char>
/// <exception cref="HostException">
/// if the Win32's SetConsoleTextAttribute fails
/// </exception>

internal static void SetConsoleTextAttribute(ConsoleHandle consoleHandle, WORD attribute)
{
Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid");
Expand Down Expand Up @@ -2849,7 +2830,6 @@ internal static bool IsCJKOutputCodePage(out uint codePage)
/// <exception cref="HostException">
/// If Win32's SetConsoleCursorPosition fails
/// </exception>

internal static void SetConsoleCursorPosition(ConsoleHandle consoleHandle, Coordinates cursorPosition)
{
Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid");
Expand Down Expand Up @@ -2884,7 +2864,6 @@ internal static void SetConsoleCursorPosition(ConsoleHandle consoleHandle, Coord
/// <exception cref="HostException">
/// If Win32's GetConsoleCursorInfo fails
/// </exception>

internal static CONSOLE_CURSOR_INFO GetConsoleCursorInfo(ConsoleHandle consoleHandle)
{
Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid");
Expand Down Expand Up @@ -2939,7 +2918,6 @@ internal static CONSOLE_FONT_INFO_EX GetConsoleFontInfo(ConsoleHandle consoleHan
/// <exception cref="HostException">
/// If Win32's SetConsoleCursorInfo fails
/// </exception>

internal static void SetConsoleCursorInfo(ConsoleHandle consoleHandle, CONSOLE_CURSOR_INFO cursorInfo)
{
Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid");
Expand Down Expand Up @@ -3002,7 +2980,6 @@ internal static void MimicKeyPress(INPUT[] inputs)
/// <summary>
/// Class to hold the Native Methods used in this file enclosing class.
/// </summary>

internal static class NativeMethods
{
internal static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); // WinBase.h
Expand Down
7 changes: 0 additions & 7 deletions src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ private static bool BreakIntoDebugger()
/// executing instance is stopped.
///
///</param>

private static void SpinUpBreakHandlerThread(bool shouldEndSession)
{
ConsoleHost host = ConsoleHost.SingletonInstance;
Expand Down Expand Up @@ -521,7 +520,6 @@ internal static ConsoleHost SingletonInstance
/// </summary>
/// <value></value>
/// <exception/>

public override string Name
{
get
Expand All @@ -538,7 +536,6 @@ public override string Name
/// </summary>
/// <value></value>
/// <exception/>

public override System.Version Version
{
get
Expand All @@ -553,7 +550,6 @@ public override System.Version Version
/// </summary>
/// <value></value>
/// <exception/>

public override System.Guid InstanceId { get; } = Guid.NewGuid();

/// <summary>
Expand Down Expand Up @@ -1609,7 +1605,6 @@ private bool LoadPSReadline()
/// Opens and Initializes the Host's sole Runspace. Processes the startup scripts and runs any command passed on the
/// command line.
/// </summary>

private void DoCreateRunspace(string initialCommand, bool skipProfiles, bool staMode, string configurationName, Collection<CommandParameter> initialCommandArgs)
{
Dbg.Assert(_runspaceRef == null, "runspace should be null");
Expand Down Expand Up @@ -1997,7 +1992,6 @@ private void RunProfile(string profileFileName, Executor exec)
/// </summary>
/// <param name="str"></param>
/// <returns></returns>

internal static string EscapeSingleQuotes(string str)
{
// worst case we have to escape every character, so capacity is twice as large as input length
Expand Down Expand Up @@ -2335,7 +2329,6 @@ internal static void RunNewInputLoop(ConsoleHost parent, bool isNested)
/// <exception cref="InvalidOperationException">
/// when there is no instanceStack.Count == 0
/// </exception>

internal static bool ExitCurrentLoop()
{
if (s_instanceStack.Count == 0)
Expand Down
Loading