diff --git a/src/Microsoft.PowerShell.Commands.Diagnostics/PdhHelper.cs b/src/Microsoft.PowerShell.Commands.Diagnostics/PdhHelper.cs index 130a7f41804..d0ffb1d579d 100644 --- a/src/Microsoft.PowerShell.Commands.Diagnostics/PdhHelper.cs +++ b/src/Microsoft.PowerShell.Commands.Diagnostics/PdhHelper.cs @@ -431,7 +431,6 @@ public void Dispose() /// /// /// - private void ReadPdhMultiString(ref IntPtr strNative, Int32 strSize, ref StringCollection strColl) { Debug.Assert(strSize >= 2); diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs index 5d2513a47ae..7cb9e6856c1 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs @@ -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. /// - [Cmdlet(VerbsCommon.Rename, "Computer", SupportsShouldProcess = true, HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2097054", RemotingCapability = RemotingCapability.SupportedByCommand)] public class RenameComputerCommand : PSCmdlet diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs index c20ef98a80d..b825266e6ef 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs @@ -545,7 +545,6 @@ public SwitchParameter IncludeUserName /// /// To display the modules of a process. /// - [Parameter(ParameterSetName = NameParameterSet)] [Parameter(ParameterSetName = IdParameterSet)] [Parameter(ParameterSetName = InputObjectParameterSet)] diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConsoleColorCmdlet.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConsoleColorCmdlet.cs index 250b00422d6..bb6a35746c6 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConsoleColorCmdlet.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConsoleColorCmdlet.cs @@ -10,7 +10,6 @@ namespace Microsoft.PowerShell.Commands /// /// Base class for a variety of commandlets that take color parameters. /// - public class ConsoleColorCmdlet : PSCmdlet { @@ -26,7 +25,6 @@ public ConsoleColorCmdlet() /// The -ForegroundColor parameter. /// /// - [Parameter] public ConsoleColor @@ -60,7 +58,6 @@ public ConsoleColorCmdlet() /// /// /// - [Parameter] public ConsoleColor diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConvertTo-Html.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConvertTo-Html.cs index b0c3ff27f35..4ca99f45ae2 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConvertTo-Html.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ConvertTo-Html.cs @@ -18,7 +18,6 @@ namespace Microsoft.PowerShell.Commands /// /// Class comment. /// - [Cmdlet(VerbsData.ConvertTo, "Html", DefaultParameterSetName = "Page", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2096595", RemotingCapability = RemotingCapability.None)] public sealed diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CsvCommands.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CsvCommands.cs index 0372298d7b5..2bc6adbe9c1 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CsvCommands.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CsvCommands.cs @@ -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. /// - public abstract PSObject InputObject { get; set; } /// diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CustomSerialization.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CustomSerialization.cs index 465ef91f037..2c85a64cf18 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CustomSerialization.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CustomSerialization.cs @@ -1104,7 +1104,6 @@ private void WriteObjectString( /// Name of property. Pass null for item. /// Object to be written. /// Serialization information about source. - private void WriteOnePrimitiveKnownType( XmlWriter writer, string property, object source, TypeSerializationInfo entry) { diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetHostCmdlet.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetHostCmdlet.cs index 76718bfde3f..444e085591f 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetHostCmdlet.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetHostCmdlet.cs @@ -10,7 +10,6 @@ namespace Microsoft.PowerShell.Commands /// /// Writes the PSHost object to the success stream. /// - [Cmdlet(VerbsCommon.Get, "Host", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2097110", RemotingCapability = RemotingCapability.None)] [OutputType(typeof(System.Management.Automation.Host.PSHost))] public diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs index 67a9e43c3b9..230f985c19e 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs @@ -198,7 +198,6 @@ public V EnsureEntry(string key) /// to maintain two sets of MeasureInfo and constantly checking /// what mode we're in. /// - [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] private class Statistics { diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ReadConsoleCmdlet.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ReadConsoleCmdlet.cs index f0cab039424..997bae76554 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ReadConsoleCmdlet.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ReadConsoleCmdlet.cs @@ -16,7 +16,6 @@ namespace Microsoft.PowerShell.Commands /// /// Retrieves input from the host virtual console and writes it to the pipeline output. /// - [Cmdlet(VerbsCommunications.Read, "Host", DefaultParameterSetName = "AsString", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2096610")] [OutputType(typeof(string), typeof(SecureString))] public sealed class ReadHostCommand : PSCmdlet @@ -24,7 +23,6 @@ public sealed class ReadHostCommand : PSCmdlet /// /// Constructs a new instance. /// - public ReadHostCommand() { @@ -36,7 +34,6 @@ public sealed class ReadHostCommand : PSCmdlet /// /// The objects to display on the host before collecting input. /// - [Parameter(Position = 0, ValueFromRemainingArguments = true)] [AllowNull] public diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs index 6739dbb38e5..fd121fc5fb2 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs @@ -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. /// - public abstract class VariableCommandBase : PSCmdlet { #region Parameters diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs index 92190c2d173..631a8564a17 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs @@ -667,7 +667,6 @@ internal bool StaMode /// /// The command line parameters to be processed. /// - internal void Parse(string[] args) { Dbg.Assert(!_dirty, "This instance has already been used. Create a new instance."); diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs index 6159e349497..0403fdf41f9 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs @@ -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. /// - internal static class ConsoleControl { #if !UNIX @@ -481,7 +480,6 @@ internal static void SetConsoleMode(ProcessWindowStyle style) /// /// Types of control ConsoleBreakSignals received by break Win32Handler delegates. /// - internal enum ConsoleBreakSignal : uint { // These correspond to the CRTL_XXX_EVENT #defines in public/sdk/inc/wincon.h @@ -511,7 +509,6 @@ internal enum ConsoleBreakSignal : uint /// /// If Win32's SetConsoleCtrlHandler fails /// - internal static void AddBreakHandler(BreakHandler handlerDelegate) { bool result = NativeMethods.SetConsoleCtrlHandler(handlerDelegate, true); @@ -532,7 +529,6 @@ internal static void AddBreakHandler(BreakHandler handlerDelegate) /// /// If Win32's SetConsoleCtrlHandler fails /// - internal static void RemoveBreakHandler() { bool result = NativeMethods.SetConsoleCtrlHandler(null, false); @@ -657,7 +653,6 @@ internal enum ConsoleModes : uint /// /// If Win32's GetConsoleMode fails /// - internal static ConsoleModes GetMode(ConsoleHandle consoleHandle) { Dbg.Assert(!consoleHandle.IsInvalid, "consoleHandle is not valid"); @@ -690,7 +685,6 @@ internal static ConsoleModes GetMode(ConsoleHandle consoleHandle) /// /// If Win32's SetConsoleMode fails /// - internal static void SetMode(ConsoleHandle consoleHandle, ConsoleModes mode) { Dbg.Assert(!consoleHandle.IsInvalid, "consoleHandle is not valid"); @@ -740,7 +734,6 @@ internal static void SetMode(ConsoleHandle consoleHandle, ConsoleModes mode) /// /// If Win32's ReadConsole fails /// - internal static string ReadConsole( ConsoleHandle consoleHandle, int initialContentLength, @@ -813,7 +806,6 @@ internal static string ReadConsole( /// /// If Win32's ReadConsoleInput fails /// - internal static int ReadConsoleInput(ConsoleHandle consoleHandle, ref INPUT_RECORD[] buffer) { Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid"); @@ -853,7 +845,6 @@ internal static int ReadConsoleInput(ConsoleHandle consoleHandle, ref INPUT_RECO /// /// If Win32's PeekConsoleInput fails /// - internal static int PeekConsoleInput ( ConsoleHandle consoleHandle, @@ -895,7 +886,6 @@ ref INPUT_RECORD[] buffer /// /// If Win32's GetNumberOfConsoleInputEvents fails /// - internal static int GetNumberOfConsoleInputEvents(ConsoleHandle consoleHandle) { Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid"); @@ -989,7 +979,6 @@ internal static CONSOLE_SCREEN_BUFFER_INFO GetConsoleScreenBufferInfo(ConsoleHan /// /// If Win32's SetConsoleScreenBufferSize fails /// - internal static void SetConsoleScreenBufferSize(ConsoleHandle consoleHandle, Size newSize) { Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid"); @@ -1078,7 +1067,6 @@ internal static WORD ColorToWORD(ConsoleColor foreground, ConsoleColor backgroun /// /// If it is illegal to write to the output buffer /// - internal static void WriteConsoleOutput(ConsoleHandle consoleHandle, Coordinates origin, BufferCell[,] contents) { Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid"); @@ -1705,7 +1693,6 @@ private static void WriteConsoleOutputPlain(ConsoleHandle consoleHandle, Coordin /// /// If there is not enough memory to complete calls to Win32's ReadConsoleOutput /// - internal static void ReadConsoleOutput ( ConsoleHandle consoleHandle, @@ -2379,7 +2366,6 @@ Coordinates origin /// /// If Win32's ScrollConsoleScreenBuffer fails /// - internal static void ScrollConsoleScreenBuffer ( ConsoleHandle consoleHandle, @@ -2430,7 +2416,6 @@ internal static void ScrollConsoleScreenBuffer /// /// If Win32's SetConsoleWindowInfo fails /// - internal static void SetConsoleWindowInfo(ConsoleHandle consoleHandle, bool absolute, SMALL_RECT windowInfo) { Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid"); @@ -2460,7 +2445,6 @@ internal static void SetConsoleWindowInfo(ConsoleHandle consoleHandle, bool abso /// /// If Win32's GetLargestConsoleWindowSize fails /// - internal static Size GetLargestConsoleWindowSize(ConsoleHandle consoleHandle) { Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid"); @@ -2490,7 +2474,6 @@ internal static Size GetLargestConsoleWindowSize(ConsoleHandle consoleHandle) /// /// If Win32's GetConsoleTitle fails /// - internal static string GetConsoleWindowTitle() { const int MaxWindowTitleLength = 1024; @@ -2522,7 +2505,6 @@ internal static string GetConsoleWindowTitle() /// /// If Win32's SetConsoleTitle fails /// - internal static void SetConsoleWindowTitle(string consoleTitle) { bool result = NativeMethods.SetConsoleTitle(consoleTitle); @@ -2643,7 +2625,6 @@ private static void WriteConsole(ConsoleHandle consoleHandle, ReadOnlySpan /// /// if the Win32's SetConsoleTextAttribute fails /// - internal static void SetConsoleTextAttribute(ConsoleHandle consoleHandle, WORD attribute) { Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid"); @@ -2849,7 +2830,6 @@ internal static bool IsCJKOutputCodePage(out uint codePage) /// /// If Win32's SetConsoleCursorPosition fails /// - internal static void SetConsoleCursorPosition(ConsoleHandle consoleHandle, Coordinates cursorPosition) { Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid"); @@ -2884,7 +2864,6 @@ internal static void SetConsoleCursorPosition(ConsoleHandle consoleHandle, Coord /// /// If Win32's GetConsoleCursorInfo fails /// - internal static CONSOLE_CURSOR_INFO GetConsoleCursorInfo(ConsoleHandle consoleHandle) { Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid"); @@ -2939,7 +2918,6 @@ internal static CONSOLE_FONT_INFO_EX GetConsoleFontInfo(ConsoleHandle consoleHan /// /// If Win32's SetConsoleCursorInfo fails /// - internal static void SetConsoleCursorInfo(ConsoleHandle consoleHandle, CONSOLE_CURSOR_INFO cursorInfo) { Dbg.Assert(!consoleHandle.IsInvalid, "ConsoleHandle is not valid"); @@ -3002,7 +2980,6 @@ internal static void MimicKeyPress(INPUT[] inputs) /// /// Class to hold the Native Methods used in this file enclosing class. /// - internal static class NativeMethods { internal static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); // WinBase.h diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs index 206a7e44e7f..cb103235a5e 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs @@ -389,7 +389,6 @@ private static bool BreakIntoDebugger() /// executing instance is stopped. /// /// - private static void SpinUpBreakHandlerThread(bool shouldEndSession) { ConsoleHost host = ConsoleHost.SingletonInstance; @@ -521,7 +520,6 @@ internal static ConsoleHost SingletonInstance /// /// /// - public override string Name { get @@ -538,7 +536,6 @@ public override string Name /// /// /// - public override System.Version Version { get @@ -553,7 +550,6 @@ public override System.Version Version /// /// /// - public override System.Guid InstanceId { get; } = Guid.NewGuid(); /// @@ -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. /// - private void DoCreateRunspace(string initialCommand, bool skipProfiles, bool staMode, string configurationName, Collection initialCommandArgs) { Dbg.Assert(_runspaceRef == null, "runspace should be null"); @@ -1997,7 +1992,6 @@ private void RunProfile(string profileFileName, Executor exec) /// /// /// - internal static string EscapeSingleQuotes(string str) { // worst case we have to escape every character, so capacity is twice as large as input length @@ -2335,7 +2329,6 @@ internal static void RunNewInputLoop(ConsoleHost parent, bool isNested) /// /// when there is no instanceStack.Count == 0 /// - internal static bool ExitCurrentLoop() { if (s_instanceStack.Count == 0) diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs index 91aceef2fbd..dbf1ec61587 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs @@ -22,7 +22,6 @@ namespace Microsoft.PowerShell /// /// Implementation of RawConsole for powershell. /// - internal sealed class ConsoleHostRawUserInterface : System.Management.Automation.Host.PSHostRawUserInterface { @@ -31,7 +30,6 @@ class ConsoleHostRawUserInterface : System.Management.Automation.Host.PSHostRawU /// /// If obtaining the buffer's foreground and background color failed /// - internal ConsoleHostRawUserInterface(ConsoleHostUserInterface mshConsole) : base() { @@ -78,7 +76,6 @@ class ConsoleHostRawUserInterface : System.Management.Automation.Host.PSHostRawU /// OR /// Win32's SetConsoleTextAttribute /// - public override ConsoleColor ForegroundColor @@ -129,7 +126,6 @@ public override /// OR /// Win32's SetConsoleTextAttribute /// - public override ConsoleColor BackgroundColor @@ -222,7 +218,6 @@ public override /// OR /// Win32's SetConsoleCursorInfo failed /// - public override int CursorSize @@ -278,7 +273,6 @@ public override /// OR /// Win32's SetConsoleWindowInfo failed /// - public override Coordinates WindowPosition @@ -345,7 +339,6 @@ public override /// OR /// Win32's SetConsoleScreenBufferSize failed /// - public override Size BufferSize @@ -398,7 +391,6 @@ public override /// OR /// Win32's SetConsoleWindowInfo failed /// - public override Size WindowSize @@ -519,7 +511,6 @@ public override /// /// If obtaining information about the buffer failed /// - public override Size MaxWindowSize @@ -543,7 +534,6 @@ public override /// OR /// Win32's GetLargestConsoleWindowSize failed /// - public override Size MaxPhysicalWindowSize @@ -602,7 +592,6 @@ private static void CacheKeyEvent(ConsoleControl.KEY_EVENT_RECORD input, ref Con /// OR /// Win32's ReadConsoleInput failed /// - public override KeyInfo ReadKey(ReadKeyOptions options) @@ -730,7 +719,6 @@ private static /// OR /// Win32's FlushConsoleInputBuffer failed /// - public override void FlushInputBuffer() @@ -752,7 +740,6 @@ public override /// OR /// Win32's PeekConsoleInput failed /// - public override bool KeyAvailable @@ -873,7 +860,6 @@ public override string WindowTitle /// OR /// there is not enough memory to complete calls to Win32's WriteConsoleOutput /// - public override void SetBufferContents(Coordinates origin, BufferCell[,] contents) @@ -1084,7 +1070,6 @@ public override /// OR /// there is not enough memory to complete calls to Win32's ReadConsoleOutput /// - public override BufferCell[,] GetBufferContents(Rectangle region) { @@ -1208,7 +1193,6 @@ BufferCell fill /// /// If Win32's WideCharToMultiByte fails /// - public override int LengthInBufferCells(string s) { @@ -1224,7 +1208,6 @@ int LengthInBufferCells(string s) /// /// If Win32's WideCharToMultiByte fails /// - public override int LengthInBufferCells(string s, int offset) { @@ -1244,7 +1227,6 @@ int LengthInBufferCells(string s, int offset) /// /// If Win32's WideCharToMultiByte fails /// - public override int LengthInBufferCells(char c) { diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs index de043bf36ec..b48af7eabbe 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs @@ -54,7 +54,6 @@ internal partial class ConsoleHostUserInterface : System.Management.Automation.H /// /// /// - internal ConsoleHostUserInterface(ConsoleHost parent) { Dbg.Assert(parent != null, "parent may not be null"); @@ -93,7 +92,6 @@ internal ConsoleHostUserInterface(ConsoleHost parent) /// /// /// - public override PSHostRawUserInterface RawUI { get @@ -131,7 +129,6 @@ public override PSHostRawUserInterface RawUI /// /// True if command completion is currently running. /// - internal bool IsCommandCompletionRunning { get @@ -144,13 +141,11 @@ internal bool IsCommandCompletionRunning /// /// True if the Read* functions should read from the stdin stream instead of from the win32 console. /// - internal bool ReadFromStdin { get; set; } /// /// True if the host shouldn't write out prompts. /// - internal bool NoPrompt { get; set; } #region Line-oriented interaction @@ -168,7 +163,6 @@ internal bool IsCommandCompletionRunning /// OR /// Win32's SetConsoleCursorPosition failed /// - public override string ReadLine() { HandleThrowOnReadAndPrompt(); @@ -193,7 +187,6 @@ public override string ReadLine() /// /// If Ctrl-C is entered by user /// - public override SecureString ReadLineAsSecureString() { HandleThrowOnReadAndPrompt(); @@ -245,7 +238,6 @@ public override SecureString ReadLineAsSecureString() /// /// If Ctrl-C is entered by user /// - private object ReadLineSafe(bool isSecureString, char? printToken) { // Don't lock (instanceLock) in here -- the caller needs to do that... @@ -439,7 +431,6 @@ private object ReadLineSafe(bool isSecureString, char? printToken) /// OR /// Win32's SetConsoleCursorPosition failed /// - private void WritePrintToken( string printToken, ref Coordinates originalCursorPosition) @@ -476,7 +467,6 @@ private void WritePrintToken( /// OR /// Win32's SetConsoleCursorPosition failed /// - private void WriteBackSpace(Coordinates originalCursorPosition) { Coordinates cursorPosition = _rawui.CursorPosition; @@ -678,7 +668,6 @@ private void WriteLineToConsole() /// OR /// Win32's WriteConsole fails /// - public override void Write(string value) { WriteImpl(value, newLine: false); @@ -749,7 +738,6 @@ private void WriteImpl(string value, bool newLine) /// OR /// Win32's WriteConsole fails /// - public override void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value) { Write(foregroundColor, backgroundColor, value, newLine: false); @@ -861,7 +849,6 @@ public override void WriteLine() /// A list of strings representing the text broken into "lines" each of which are guaranteed not to exceed /// maxWidthInBufferCells. /// - internal List WrapText(string text, int maxWidthInBufferCells) { List result = new List(); @@ -953,7 +940,6 @@ internal List WrapText(string text, int maxWidthInBufferCells) /// /// Struct used by WrapText. /// - [Flags] internal enum WordFlags { @@ -988,7 +974,6 @@ internal struct Word /// This can be made faster by, instead of creating little strings for each word, creating indices of the start and end /// range of a word. That would reduce the string allocations. /// - internal List ChopTextIntoWords(string text, int maxWidthInBufferCells) { List result = new List(); @@ -1096,7 +1081,6 @@ internal List ChopTextIntoWords(string text, int maxWidthInBufferCells) /// /// The list into which the words will be added. /// - internal void AddWord(string text, int startIndex, int endIndex, int maxWidthInBufferCells, bool isWhitespace, ref List result) { @@ -1235,7 +1219,6 @@ public override void WriteInformation(InformationRecord record) /// OR /// Win32's WriteConsole fails /// - public override void WriteVerboseLine(string message) { // don't lock here as WriteLine is already protected. @@ -1273,7 +1256,6 @@ public override void WriteVerboseLine(string message) /// OR /// Win32's WriteConsole fails /// - public override void WriteWarningLine(string message) { // don't lock here as WriteLine is already protected. @@ -1297,7 +1279,6 @@ public override void WriteWarningLine(string message) /// /// Invoked by CommandBase.WriteProgress to display a progress record. /// - public override void WriteProgress(Int64 sourceId, ProgressRecord record) { if (record == null) @@ -1436,7 +1417,6 @@ internal enum ReadLineResult /// OR /// Win32's SetConsoleCursorPosition failed /// - internal string ReadLine(bool endOnTab, string initialContent, out ReadLineResult result, bool calledFromPipeline, bool transcribeResult) { result = ReadLineResult.endedOnEnter; diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceProgress.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceProgress.cs index ffc5735f35f..75954bddca8 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceProgress.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceProgress.cs @@ -16,7 +16,6 @@ class ConsoleHostUserInterface : System.Management.Automation.Host.PSHostUserInt /// Called at the end of a prompt loop to take down any progress display that might have appeared and purge any /// outstanding progress activity state. /// - internal void ResetProgress() @@ -55,7 +54,6 @@ class ConsoleHostUserInterface : System.Management.Automation.Host.PSHostUserInt /// Invoked by ConsoleHostUserInterface.WriteProgress to update the set of outstanding activities for which /// ProgressRecords have been received. /// - private void HandleIncomingProgressRecord(Int64 sourceId, ProgressRecord record) @@ -101,7 +99,6 @@ class ConsoleHostUserInterface : System.Management.Automation.Host.PSHostUserInt /// /// TimerCallback for '_progPaneUpdateTimer' to update 'progPaneUpdateFlag' /// - private void ProgressPaneUpdateTimerElapsed(object sender) diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePrompt.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePrompt.cs index 0afe5f987d8..cd7c7c90e67 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePrompt.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePrompt.cs @@ -87,7 +87,6 @@ private static /// If the converting the user input to the prompt field type fails unless it is caused by /// OverflowException or FormatException /// - public override Dictionary Prompt(string caption, string message, Collection descriptions) @@ -475,7 +474,6 @@ private PromptCommonInputErrors PromptTryConvertTo(Type fieldType, bool isFromRe /// /// /// - private string PromptCommandMode(string input, FieldDescription desc, out bool inputDone) { Dbg.Assert(input != null && input.StartsWith(PromptCommandPrefix, StringComparison.OrdinalIgnoreCase), diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePromptForChoice.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePromptForChoice.cs index 0dfe3f63739..b22845c2d56 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePromptForChoice.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfacePromptForChoice.cs @@ -39,7 +39,6 @@ internal partial class ConsoleHostUserInterface : PSHostUserInterface, IHostUISu /// /// when prompt is canceled by, for example, Ctrl-c. /// - public override int PromptForChoice(string caption, string message, Collection choices, int defaultChoice) { HandleThrowOnReadAndPrompt(); diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceSecurity.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceSecurity.cs index 6926f685795..7f34c789fc7 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceSecurity.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterfaceSecurity.cs @@ -29,7 +29,6 @@ class ConsoleHostUserInterface : System.Management.Automation.Host.PSHostUserInt /// Message to be displayed. /// Caption for the message. /// PSCredential object. - public override PSCredential PromptForCredential( string caption, string message, @@ -54,7 +53,6 @@ public override PSCredential PromptForCredential( /// What type of creds can be supplied by the user. /// Options that control the cred gathering UI behavior. /// PSCredential object, or null if input was cancelled (or if reading from stdin and stdin at EOF). - public override PSCredential PromptForCredential( string caption, string message, diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleShell.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleShell.cs index cd8364fc7ce..5bef7c68676 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleShell.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleShell.cs @@ -11,7 +11,6 @@ namespace Microsoft.PowerShell /// This class provides an entry point which is called by minishell's main /// to transfer control to Msh console host implementation. /// - public static class ConsoleShell { /// Entry point in to ConsoleShell. This method is called by main of minishell. diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/Executor.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/Executor.cs index 24b48837005..e5b3ba9f41d 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/Executor.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/Executor.cs @@ -24,7 +24,6 @@ namespace Microsoft.PowerShell /// The class' instance methods manage a single pipeline. The class' static methods track the outstanding instances to /// ensure that only one instance is 'active' (and therefore cancellable) at a time. /// - internal class Executor { [Flags] @@ -527,7 +526,6 @@ internal string ExecuteCommandAndGetResultAsString(string command, out Exception /// The Nullable`bool representation of the first result object returned, or null if an exception was thrown or no /// objects were returned by the command. /// - internal bool? ExecuteCommandAndGetResultAsBool(string command) { Exception unused = null; diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/PendingProgress.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/PendingProgress.cs index 2ca795447d0..153f99b1b20 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/PendingProgress.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/PendingProgress.cs @@ -24,7 +24,6 @@ namespace Microsoft.PowerShell /// This class uses lots of nearly identical helper functions to recursively traverse the tree. If I weren't so pressed /// for time, I would see if generic methods could be used to collapse the number of traversers. /// - internal class PendingProgress { @@ -42,7 +41,6 @@ class PendingProgress /// The ProgressRecord received that will either update the status of an activity which we are already tracking, or /// represent a new activity that we need to track. /// - internal void Update(Int64 sourceId, ProgressRecord record) @@ -179,7 +177,6 @@ class PendingProgress /// /// Index into the list of the node to be removed. /// - private void RemoveNode(ArrayList nodes, int indexToRemove) @@ -255,7 +252,6 @@ class PendingProgress /// /// Node to be added. /// - private void AddNode(ArrayList nodes, ProgressNode nodeToAdd) @@ -356,7 +352,6 @@ internal override /// /// Convenience overload. /// - private ProgressNode FindNodeById(Int64 sourceId, int activityId) @@ -427,7 +422,6 @@ internal override /// /// The found node, or null if no suitable node was located. /// - private ProgressNode FindNodeById(Int64 sourceId, int activityId, out ArrayList listWhereFound, out int indexWhereFound) @@ -465,7 +459,6 @@ internal override /// /// The found node, or null if no suitable node was located. /// - private ProgressNode FindOldestNodeOfGivenStyle(ArrayList nodes, int oldestSoFar, ProgressNode.RenderStyle style) @@ -530,7 +523,6 @@ internal override /// /// All nodes are aged every time a new ProgressRecord is received. /// - private void AgeNodesAndResetStyle() @@ -561,7 +553,6 @@ internal override /// /// An array of strings containing the textual representation of the outstanding progress activities. /// - internal string[] Render(int maxWidth, int maxHeight, PSHostRawUserInterface rawUI) @@ -631,7 +622,6 @@ internal override /// /// The PSHostRawUserInterface used to gauge string widths in the rendering. /// - private void RenderHelper(ArrayList strings, ArrayList nodes, int indentation, int maxWidth, PSHostRawUserInterface rawUI) @@ -708,7 +698,6 @@ internal override /// /// /// - private int TallyHeight(PSHostRawUserInterface rawUi, int maxHeight, int maxWidth) { HeightTallyer ht = new HeightTallyer(rawUi, maxHeight, maxWidth); @@ -724,7 +713,6 @@ private int TallyHeight(PSHostRawUserInterface rawUi, int maxHeight, int maxWidt /// /// /// - private bool AllNodesHaveGivenStyle(ArrayList nodes, ProgressNode.RenderStyle style) @@ -759,7 +747,6 @@ private int TallyHeight(PSHostRawUserInterface rawUi, int maxHeight, int maxWidt /// /// Debugging code. NodeVisitor that counts up the number of nodes in the tree. /// - private class CountingNodeVisitor : NodeVisitor @@ -783,7 +770,6 @@ internal override /// /// The number of nodes in the tree. /// - private int CountNodes() @@ -823,7 +809,6 @@ internal override /// false to indicate that all of the nodes are compressed to a given level, but that the rendering still can't fit /// within the constraint. /// - private bool CompressToFitHelper( @@ -894,7 +879,6 @@ internal override /// The number of nodes that were made invisible during the compression. /// /// - private int CompressToFit(PSHostRawUserInterface rawUi, int maxHeight, int maxWidth) @@ -983,7 +967,6 @@ class NodeVisitor /// /// true to continue visiting nodes, false if not. /// - internal abstract bool Visit(ProgressNode node, ArrayList listWhereFound, int indexWhereFound); diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressNode.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressNode.cs index 35066c0bf09..92fc1316240 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressNode.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressNode.cs @@ -15,7 +15,6 @@ namespace Microsoft.PowerShell /// ProgressNode is an augmentation of the ProgressRecord type that adds extra fields for the purposes of tracking /// outstanding activities received by the host, and rendering them in the console. /// - internal class ProgressNode : ProgressRecord @@ -23,7 +22,6 @@ namespace Microsoft.PowerShell /// /// Indicates the various layouts for rendering a particular node. Each style is progressively less terse. /// - internal enum RenderStyle @@ -47,7 +45,6 @@ namespace Microsoft.PowerShell /// /// Constructs an instance from a ProgressRecord. /// - internal ProgressNode(Int64 sourceId, ProgressRecord record) : @@ -80,7 +77,6 @@ namespace Microsoft.PowerShell /// /// The PSHostRawUserInterface used to gauge string widths in the rendering. /// - internal void Render(ArrayList strCollection, int indentation, int maxWidth, PSHostRawUserInterface rawUI) @@ -130,7 +126,6 @@ namespace Microsoft.PowerShell /// /// Indicate if the full StatusDescription and CurrentOperation should be displayed. /// - private void RenderFull(ArrayList strCollection, int indentation, int maxWidth, PSHostRawUserInterface rawUI, bool isFullPlus) @@ -240,7 +235,6 @@ private static void RenderFullDescription(string description, string indent, int /// /// The PSHostRawUserInterface used to gauge string widths in the rendering. /// - private void RenderCompact(ArrayList strCollection, int indentation, int maxWidth, PSHostRawUserInterface rawUI) @@ -309,7 +303,6 @@ private static void RenderFullDescription(string description, string indent, int /// /// The PSHostRawUserInterface used to gauge string widths in the rendering. /// - private void RenderMinimal(ArrayList strCollection, int indentation, int maxWidth, PSHostRawUserInterface rawUI) @@ -347,7 +340,6 @@ private static void RenderFullDescription(string description, string indent, int /// /// The nodes that have this node as their parent. /// - internal ArrayList Children; @@ -362,7 +354,6 @@ private static void RenderFullDescription(string description, string indent, int /// space. The rendering of nodes can be progressively "compressed" into a more terse format, or not rendered at all in /// order to fit as many nodes as possible in the available space. The oldest nodes are compressed or skipped first. /// - internal int Age; @@ -370,7 +361,6 @@ private static void RenderFullDescription(string description, string indent, int /// /// The style in which this node should be rendered. /// - internal RenderStyle Style = RenderStyle.FullPlus; @@ -378,7 +368,6 @@ private static void RenderFullDescription(string description, string indent, int /// /// Identifies the source of the progress record. /// - internal Int64 SourceId; @@ -387,7 +376,6 @@ private static void RenderFullDescription(string description, string indent, int /// The number of vertical BufferCells that are required to render the node in its current style. /// /// - internal int LinesRequiredMethod(PSHostRawUserInterface rawUi, int maxWidth) { Dbg.Assert(this.RecordType != ProgressRecordType.Completed, "should never render completed records"); @@ -421,7 +409,6 @@ internal int LinesRequiredMethod(PSHostRawUserInterface rawUi, int maxWidth) /// The number of vertical BufferCells that are required to render the node in the Full style. /// /// - private int LinesRequiredInFullStyleMethod(PSHostRawUserInterface rawUi, int maxWidth, bool isFullPlus) { // Since the fields of this instance could have been changed, we compute this on-the-fly. @@ -479,7 +466,6 @@ private int LinesRequiredInFullStyleMethod(PSHostRawUserInterface rawUi, int max /// The number of vertical BufferCells that are required to render the node in the Compact style. /// /// - private int LinesRequiredInCompactStyle diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressPane.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressPane.cs index 55dba38d6b4..f65beebd542 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressPane.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressPane.cs @@ -13,7 +13,6 @@ namespace Microsoft.PowerShell /// progress updates are shown. /// /// - internal class ProgressPane { @@ -23,7 +22,6 @@ class ProgressPane /// /// An implementation of the PSHostRawUserInterface with which the pane will be shown and hidden. /// - internal ProgressPane(ConsoleHostUserInterface ui) { @@ -39,7 +37,6 @@ class ProgressPane /// true if the pane is visible, false if not. /// /// - internal bool IsShowing @@ -54,7 +51,6 @@ class ProgressPane /// Shows the pane in the screen buffer. Saves off the content of the region of the buffer that will be overwritten so /// that it can be restored again. /// - internal void Show() @@ -140,7 +136,6 @@ class ProgressPane /// Hides the pane by restoring the saved contents of the region of the buffer that the pane occupies. If the pane is /// not showing, then does nothing. /// - internal void Hide() @@ -164,7 +159,6 @@ class ProgressPane /// /// A PendingProgress instance that represents the outstanding activities that should be shown. /// - internal void Show(PendingProgress pendingProgress) diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/Serialization.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/Serialization.cs index 696b95ca049..5340a3950d7 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/Serialization.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/Serialization.cs @@ -14,26 +14,22 @@ namespace Microsoft.PowerShell /// Wraps Hitesh's xml serializer in such a way that it will select the proper serializer based on the data /// format. /// - internal class Serialization { /// /// Describes the format of the data streamed between minishells, e.g. the allowed arguments to the minishell /// -outputformat and -inputformat command line parameters. /// - internal enum DataFormat { /// /// Text format -- i.e. stream text just as out-default would display it. /// - Text = 0, /// /// XML-serialized format. /// - XML = 1, /// diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/StartTranscriptCmdlet.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/StartTranscriptCmdlet.cs index 1587f91d3f9..3f413df76ef 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/StartTranscriptCmdlet.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/StartTranscriptCmdlet.cs @@ -12,7 +12,6 @@ namespace Microsoft.PowerShell.Commands /// /// Implements the start-transcript cmdlet. /// - [Cmdlet(VerbsLifecycle.Start, "Transcript", SupportsShouldProcess = true, DefaultParameterSetName = "ByPath", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2096485")] [OutputType(typeof(string))] public sealed class StartTranscriptCommand : PSCmdlet @@ -23,7 +22,6 @@ public sealed class StartTranscriptCommand : PSCmdlet /// Documents/PowerShell_transcript.YYYYMMDDmmss.txt. /// /// - [Parameter(Position = 0, ParameterSetName = "ByPath")] [ValidateNotNullOrEmpty] public string Path @@ -77,7 +75,6 @@ public string OutputDirectory /// Describes the current state of the activity. /// /// - [Parameter] public SwitchParameter Append { @@ -99,7 +96,6 @@ public SwitchParameter Append /// /// The read-only attribute will not be replaced when the transcript is done. /// - [Parameter()] public SwitchParameter Force { diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/StopTranscriptCmdlet.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/StopTranscriptCmdlet.cs index 9fae35ac83e..48b392f98e7 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/StopTranscriptCmdlet.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/StopTranscriptCmdlet.cs @@ -10,7 +10,6 @@ namespace Microsoft.PowerShell.Commands /// /// Implements the stop-transcript cmdlet. /// - [Cmdlet(VerbsLifecycle.Stop, "Transcript", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2096798")] [OutputType(typeof(string))] public sealed class StopTranscriptCommand : PSCmdlet @@ -18,7 +17,6 @@ public sealed class StopTranscriptCommand : PSCmdlet /// /// Starts the transcription. /// - protected override void BeginProcessing() diff --git a/src/Microsoft.PowerShell.Security/security/CertificateProvider.cs b/src/Microsoft.PowerShell.Security/security/CertificateProvider.cs index d0a589bb1cb..ff66e7c9932 100644 --- a/src/Microsoft.PowerShell.Security/security/CertificateProvider.cs +++ b/src/Microsoft.PowerShell.Security/security/CertificateProvider.cs @@ -469,7 +469,6 @@ public void FreeCert(IntPtr certContext) /// /// Native IntPtr store handle. /// - public IntPtr StoreHandle { get @@ -503,7 +502,6 @@ public string StoreName /// /// True if a real store is open. /// - public bool Valid { get @@ -701,7 +699,6 @@ public CertificateProvider() /// path is null or empty. /// destination is null or empty. /// - protected override void RemoveItem( string path, bool recurse) @@ -808,7 +805,6 @@ protected override object RemoveItemDynamicParameters(string path, bool recurse) /// path is null or empty. /// destination is null or empty. /// - protected override void MoveItem( string path, string destination) @@ -1620,7 +1616,6 @@ private static string[] GetPathElements(string path) /// /// Key prov info. /// No return. - [SuppressMessage("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", MessageId = "System.Management.Automation.Security.NativeMethods.NCryptSetProperty(System.IntPtr,System.String,System.Void*,System.Int32,System.Int32)")] [SuppressMessage("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", MessageId = "System.Management.Automation.Security.NativeMethods.NCryptFreeObject(System.IntPtr)")] private void DoDeleteKey(IntPtr pProvInfo) @@ -1749,7 +1744,6 @@ private void DoDeleteKey(IntPtr pProvInfo) /// Boolean to specify whether or not to delete private key. /// Source path. /// No return. - private void RemoveCertStore(string storeName, bool fDeleteKey, string sourcePath) { // if recurse is true, remove every cert in the store @@ -1847,7 +1841,6 @@ private void RemoveCertItem(X509Certificate2 cert, bool fDeleteKey, bool fMachin /// Machine context or user. /// Source path. /// No return. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults")] private void DoRemove(X509Certificate2 cert, bool fDeleteKey, bool fMachine, string sourcePath) { @@ -3085,7 +3078,6 @@ public struct EnhancedKeyUsageRepresentation /// /// Constructor of an EnhancedKeyUsageRepresentation. /// - [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Oid")] public EnhancedKeyUsageRepresentation(string inputFriendlyName, string inputOid) @@ -3154,14 +3146,12 @@ public override string ToString() /// /// Class for SendAsTrustedIssuer. /// - [SuppressMessage("Microsoft.Design", "CA1053:StaticHolderTypesShouldNotHaveConstructors")] public sealed class SendAsTrustedIssuerProperty { /// /// Get property of SendAsTrustedIssuer. /// - [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] public static bool ReadSendAsTrustedIssuerProperty(X509Certificate2 cert) { @@ -3197,7 +3187,6 @@ public static bool ReadSendAsTrustedIssuerProperty(X509Certificate2 cert) /// /// Set property of SendAsTrustedIssuer. /// - [SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] public static void WriteSendAsTrustedIssuerProperty(X509Certificate2 cert, string certPath, bool addProperty) { @@ -3311,7 +3300,6 @@ private static string[] GetPathElements(string path) /// /// Class for ekulist. /// - public sealed class EnhancedKeyUsageProperty { private List _ekuList = new List(); @@ -3355,7 +3343,6 @@ public EnhancedKeyUsageProperty(X509Certificate2 cert) /// /// Class for DNSNameList. /// - public sealed class DnsNameProperty { private List _dnsList = new List(); diff --git a/src/Microsoft.WSMan.Management/CredSSP.cs b/src/Microsoft.WSMan.Management/CredSSP.cs index 52c4f4e921d..f81e6447ce7 100644 --- a/src/Microsoft.WSMan.Management/CredSSP.cs +++ b/src/Microsoft.WSMan.Management/CredSSP.cs @@ -97,7 +97,6 @@ internal IWSManSession CreateWSManSession() /// the server, hence allowing the user to perform management operations that /// access a second hop. /// - [Cmdlet(VerbsLifecycle.Disable, "WSManCredSSP", HelpUri = "https://go.microsoft.com/fwlink/?LinkId=2096628")] [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Cred")] [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "SSP")] diff --git a/src/Microsoft.WSMan.Management/Interop.cs b/src/Microsoft.WSMan.Management/Interop.cs index 7df5d16fc93..6e813ef17e1 100644 --- a/src/Microsoft.WSMan.Management/Interop.cs +++ b/src/Microsoft.WSMan.Management/Interop.cs @@ -23,7 +23,6 @@ namespace Microsoft.WSMan.Management #region WsManEnumFlags /// _WSManEnumFlags enumeration. - [SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags")] [TypeLibType((short)0)] public enum WSManEnumFlags @@ -926,7 +925,6 @@ public interface IWSManSession /// /// /// - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "URI")] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "0#")] [DispId(5)] diff --git a/src/Microsoft.WSMan.Management/InvokeWSManAction.cs b/src/Microsoft.WSMan.Management/InvokeWSManAction.cs index 71f8ae4c84d..7c217b0ea9a 100644 --- a/src/Microsoft.WSMan.Management/InvokeWSManAction.cs +++ b/src/Microsoft.WSMan.Management/InvokeWSManAction.cs @@ -23,7 +23,6 @@ namespace Microsoft.WSMan.Management /// Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/Win32_Service /// -SelectorSet {Name=Spooler} /// - [Cmdlet(VerbsLifecycle.Invoke, "WSManAction", DefaultParameterSetName = "URI", HelpUri = "https://go.microsoft.com/fwlink/?LinkId=2096843")] public class InvokeWSManActionCommand : AuthenticatingWSManCommand, IDisposable { diff --git a/src/Microsoft.WSMan.Management/NewWSManSession.cs b/src/Microsoft.WSMan.Management/NewWSManSession.cs index b2d6719e7e9..2bb367aeecc 100644 --- a/src/Microsoft.WSMan.Management/NewWSManSession.cs +++ b/src/Microsoft.WSMan.Management/NewWSManSession.cs @@ -25,7 +25,6 @@ namespace Microsoft.WSMan.Management /// Invoke-WSManAction /// Connect-WSMan. /// - [Cmdlet(VerbsCommon.New, "WSManSessionOption", HelpUri = "https://go.microsoft.com/fwlink/?LinkId=2096845")] public class NewWSManSessionOptionCommand : PSCmdlet { diff --git a/src/Microsoft.WSMan.Management/PingWSMan.cs b/src/Microsoft.WSMan.Management/PingWSMan.cs index 9581eaabc33..47ca6ef738b 100644 --- a/src/Microsoft.WSMan.Management/PingWSMan.cs +++ b/src/Microsoft.WSMan.Management/PingWSMan.cs @@ -22,7 +22,6 @@ namespace Microsoft.WSMan.Management /// Issues an operation against the remote machine to ensure that the wsman /// service is running. /// - [Cmdlet(VerbsDiagnostic.Test, "WSMan", HelpUri = "https://go.microsoft.com/fwlink/?LinkId=2097114")] public class TestWSManCommand : AuthenticatingWSManCommand, IDisposable { diff --git a/src/Microsoft.WSMan.Management/WSManConnections.cs b/src/Microsoft.WSMan.Management/WSManConnections.cs index 4aeb283b81f..6d6c5f6bc0e 100644 --- a/src/Microsoft.WSMan.Management/WSManConnections.cs +++ b/src/Microsoft.WSMan.Management/WSManConnections.cs @@ -288,7 +288,6 @@ protected override void BeginProcessing() /// is the local computer. Type the fully qualified domain name, NETBIOS name or /// IP address to indicate the remote host(s) /// - [Cmdlet(VerbsCommunications.Disconnect, "WSMan", HelpUri = "https://go.microsoft.com/fwlink/?LinkId=2096839")] public class DisconnectWSManCommand : PSCmdlet, IDisposable { diff --git a/src/Microsoft.WSMan.Management/WSManInstance.cs b/src/Microsoft.WSMan.Management/WSManInstance.cs index 5a3d6b74f7f..ca299f1c085 100644 --- a/src/Microsoft.WSMan.Management/WSManInstance.cs +++ b/src/Microsoft.WSMan.Management/WSManInstance.cs @@ -28,7 +28,6 @@ namespace Microsoft.WSMan.Management /// Invoke-WSManAction -Action StartService -ResourceURI wmicimv2/Win32_Service /// -SelectorSet {Name=Spooler} /// - [Cmdlet(VerbsCommon.Get, "WSManInstance", DefaultParameterSetName = "GetInstance", HelpUri = "https://go.microsoft.com/fwlink/?LinkId=2096627")] public class GetWSManInstanceCommand : AuthenticatingWSManCommand, IDisposable { @@ -102,7 +101,6 @@ public string ComputerName /// remote machine. The format of this string is: /// transport://server:port/Prefix. /// - [Parameter( ParameterSetName = "GetInstance")] [Parameter( @@ -143,7 +141,6 @@ public Uri Dialect /// Switch indicates list all instances of a management resource. Equivalent to /// WSManagement Enumerate. /// - [Parameter(Mandatory = true, ParameterSetName = "Enumerate")] public SwitchParameter Enumerate @@ -181,7 +178,6 @@ public string Filter /// Specifies a section inside the instance that is to be updated or retrieved /// for the given operation. /// - [Parameter(ParameterSetName = "GetInstance")] [ValidateNotNullOrEmpty] public string Fragment @@ -242,7 +238,6 @@ public Int32 Port /// associated instances. This can only be used when specifying the Dialect as /// Association. /// - [Parameter(ParameterSetName = "Enumerate")] public SwitchParameter Associations { @@ -754,7 +749,6 @@ public string Fragment /// request. These are similar to switches used in command line shells in that /// they are service-specific. /// - [Parameter] [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] [Alias("os")] @@ -788,7 +782,6 @@ public Int32 Port /// The following is the definition of the input parameter "ResourceURI". /// URI of the resource class/instance representation. /// - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "URI")] [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Resourceuri")] @@ -1077,7 +1070,6 @@ public Uri ConnectionURI /// request. These are similar to switches used in command line shells in that /// they are service-specific. /// - [Parameter] [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] [Alias("os")] @@ -1111,7 +1103,6 @@ public Int32 Port /// The following is the definition of the input parameter "ResourceURI". /// URI of the resource class/instance representation. /// - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "URI")] [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Resourceuri")] @@ -1275,7 +1266,6 @@ protected override void ProcessRecord() /// Creates an instance of a management resource identified by the resource URI /// using specified ValueSet or input File. /// - [Cmdlet(VerbsCommon.New, "WSManInstance", DefaultParameterSetName = "ComputerName", HelpUri = "https://go.microsoft.com/fwlink/?LinkId=2096933")] public class NewWSManInstanceCommand : AuthenticatingWSManCommand, IDisposable { diff --git a/src/Microsoft.WSMan.Runtime/WSManSessionOption.cs b/src/Microsoft.WSMan.Runtime/WSManSessionOption.cs index 014cc03c8ec..d8681a54618 100644 --- a/src/Microsoft.WSMan.Runtime/WSManSessionOption.cs +++ b/src/Microsoft.WSMan.Runtime/WSManSessionOption.cs @@ -23,7 +23,6 @@ namespace Microsoft.WSMan.Management /// /// Session option class. /// - public sealed class SessionOption { /// diff --git a/src/System.Management.Automation/engine/ComInterop/ComMethodDesc.cs b/src/System.Management.Automation/engine/ComInterop/ComMethodDesc.cs index 1f16d9c90ef..35b4c9fa25d 100644 --- a/src/System.Management.Automation/engine/ComInterop/ComMethodDesc.cs +++ b/src/System.Management.Automation/engine/ComInterop/ComMethodDesc.cs @@ -31,7 +31,6 @@ internal ComMethodDesc(string name, int dispId, INVOKEKIND invkind) internal ComMethodDesc(ITypeInfo typeInfo, FUNCDESC funcDesc) : this(funcDesc.memid) { - InvokeKind = funcDesc.invkind; string[] rgNames = new string[1 + funcDesc.cParams]; diff --git a/src/System.Management.Automation/engine/ComInterop/ComTypeDesc.cs b/src/System.Management.Automation/engine/ComInterop/ComTypeDesc.cs index 85af47ca9d6..92e9ea8ed6f 100644 --- a/src/System.Management.Automation/engine/ComInterop/ComTypeDesc.cs +++ b/src/System.Management.Automation/engine/ComInterop/ComTypeDesc.cs @@ -25,7 +25,6 @@ internal ComTypeDesc(ITypeInfo typeInfo, ComTypeLibDesc typeLibDesc) TypeLib = typeLibDesc; } - internal static ComTypeDesc FromITypeInfo(ITypeInfo typeInfo, TYPEATTR typeAttr) { switch (typeAttr.typekind) diff --git a/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs b/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs index aa297ecb487..bf4c3f021f0 100644 --- a/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs +++ b/src/System.Management.Automation/engine/ComInterop/IDispatchComObject.cs @@ -73,7 +73,6 @@ namespace System.Management.Automation.ComInterop /// just find and invoke the multicast delegate corresponding to the invoked /// dispid. /// - internal sealed class IDispatchComObject : ComObject, IDynamicMetaObjectProvider { private ComTypeDesc _comTypeDesc; diff --git a/src/System.Management.Automation/engine/ComInterop/UnknownArgBuilder.cs b/src/System.Management.Automation/engine/ComInterop/UnknownArgBuilder.cs index f7aa95df6e9..cf97a976a80 100644 --- a/src/System.Management.Automation/engine/ComInterop/UnknownArgBuilder.cs +++ b/src/System.Management.Automation/engine/ComInterop/UnknownArgBuilder.cs @@ -48,7 +48,6 @@ internal override Expression MarshalToRef(Expression parameter) ); } - internal override Expression UnmarshalFromRef(Expression value) { // value == IntPtr.Zero ? null : Marshal.GetObjectForIUnknown(value); diff --git a/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs b/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs index c7d3f139ae9..9c5ea9e9900 100644 --- a/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs +++ b/src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs @@ -245,7 +245,6 @@ private static void CheckForAmbiguousMatch(Type argumentType, List comp typeNames += typeName; } - throw Error.AmbiguousConversion(argumentType.Name, typeNames); } diff --git a/src/System.Management.Automation/engine/CommandBase.cs b/src/System.Management.Automation/engine/CommandBase.cs index 720a93ab85d..b2019ec90dd 100644 --- a/src/System.Management.Automation/engine/CommandBase.cs +++ b/src/System.Management.Automation/engine/CommandBase.cs @@ -543,7 +543,6 @@ public object GetVariableValue(string name) } /// - public object GetVariableValue(string name, object defaultValue) { using (PSTransactionManager.GetEngineProtectionScope()) diff --git a/src/System.Management.Automation/engine/InformationRecord.cs b/src/System.Management.Automation/engine/InformationRecord.cs index 81a9789bb81..b9513e30d87 100644 --- a/src/System.Management.Automation/engine/InformationRecord.cs +++ b/src/System.Management.Automation/engine/InformationRecord.cs @@ -14,7 +14,6 @@ namespace System.Management.Automation /// which, according to host or user preference, forwards that information on to the host for rendering to the user. /// /// - [DataContract()] public class InformationRecord { diff --git a/src/System.Management.Automation/engine/ProgressRecord.cs b/src/System.Management.Automation/engine/ProgressRecord.cs index f040e24e416..346290f189f 100644 --- a/src/System.Management.Automation/engine/ProgressRecord.cs +++ b/src/System.Management.Automation/engine/ProgressRecord.cs @@ -15,7 +15,6 @@ namespace System.Management.Automation /// which, according to user preference, forwards that information on to the host for rendering to the user. /// /// - [DataContract()] public class ProgressRecord @@ -35,7 +34,6 @@ class ProgressRecord /// /// A description of the status of the activity. /// - public ProgressRecord(int activityId, string activity, string statusDescription) { @@ -81,7 +79,6 @@ internal ProgressRecord(ProgressRecord other) /// Gets the Id of the activity to which this record corresponds. Used as a 'key' for the /// linking of subordinate activities. /// - public int ActivityId @@ -107,7 +104,6 @@ internal ProgressRecord(ProgressRecord other) /// shell so that a script can set that variable, and have all subsequent calls to WriteProgress (the API) be /// subordinate to the "current parent id".--> /// - public int ParentActivityId @@ -135,7 +131,6 @@ internal ProgressRecord(ProgressRecord other) /// States the overall intent of whats being accomplished, such as "Recursively removing item c:\temp." Typically /// displayed in conjunction with a progress bar. /// - public string Activity @@ -159,7 +154,6 @@ internal ProgressRecord(ProgressRecord other) /// /// Gets and sets the current status of the operation, e.g., "35 of 50 items Copied." or "95% completed." or "100 files purged." /// - public string StatusDescription @@ -185,7 +179,6 @@ internal ProgressRecord(ProgressRecord other) /// below its associated progress bar, e.g., "deleting file foo.bar" /// Set to null or empty in the case a sub-activity will be used to show the current operation. /// - public string CurrentOperation @@ -207,7 +200,6 @@ internal ProgressRecord(ProgressRecord other) /// Gets and sets the estimate of the percentage of total work for the activity that is completed. Typically displayed as a progress bar. /// Set to a negative value to indicate that the percentage completed should not be displayed. /// - public int PercentComplete @@ -241,7 +233,6 @@ internal ProgressRecord(ProgressRecord other) /// /// A value less than 0 means "don't display a time remaining." /// - public int SecondsRemaining @@ -262,7 +253,6 @@ internal ProgressRecord(ProgressRecord other) /// /// Gets and sets the type of record represented by this instance. /// - public ProgressRecordType RecordType @@ -291,7 +281,6 @@ internal ProgressRecord(ProgressRecord other) /// a, b, c, d, e, f, and g are the values of ParentActivityId, ActivityId, Activity, StatusDescription, /// CurrentOperation, PercentComplete, SecondsRemaining and RecordType properties. /// - public override string ToString() @@ -520,7 +509,6 @@ internal PSObject ToPSObjectForRemoting() /// /// Defines two types of progress record that refer to the beginning (or middle) and end of an operation. /// - public enum ProgressRecordType { @@ -539,7 +527,6 @@ enum ProgressRecordType /// Finally, when the host receives a 'completed' record /// for that activity, it will remove the progress indicator. /// - Processing, /// @@ -550,7 +537,6 @@ enum ProgressRecordType /// ProgressRecordType.Completed exactly once, in the last call /// to WriteProgress. /// - Completed } } diff --git a/src/System.Management.Automation/engine/ScopedItemSearcher.cs b/src/System.Management.Automation/engine/ScopedItemSearcher.cs index 4d5f2f1107f..a68b93694b9 100644 --- a/src/System.Management.Automation/engine/ScopedItemSearcher.cs +++ b/src/System.Management.Automation/engine/ScopedItemSearcher.cs @@ -111,7 +111,6 @@ public bool MoveNext() /// /// Gets the current scoped item. /// - T IEnumerator.Current { get diff --git a/src/System.Management.Automation/engine/SessionState.cs b/src/System.Management.Automation/engine/SessionState.cs index f011a87a2aa..64e06a81744 100644 --- a/src/System.Management.Automation/engine/SessionState.cs +++ b/src/System.Management.Automation/engine/SessionState.cs @@ -18,7 +18,6 @@ namespace System.Management.Automation /// /// Holds the state of a Monad Shell session. /// - [SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling", Justification = "This is a bridge class between internal classes and a public interface. It requires this much coupling.")] internal sealed partial class SessionStateInternal { diff --git a/src/System.Management.Automation/engine/SessionStateScope.cs b/src/System.Management.Automation/engine/SessionStateScope.cs index 54b7a40e1f2..6fd1749ba30 100644 --- a/src/System.Management.Automation/engine/SessionStateScope.cs +++ b/src/System.Management.Automation/engine/SessionStateScope.cs @@ -1852,7 +1852,6 @@ private Dictionary GetAllScopeFunctions() /// table. The entries in this table are automatically propagated /// to new scopes. /// - private readonly Dictionary> _allScopeCmdlets = new Dictionary>(StringComparer.OrdinalIgnoreCase); /// diff --git a/src/System.Management.Automation/engine/hostifaces/ChoiceDescription.cs b/src/System.Management.Automation/engine/hostifaces/ChoiceDescription.cs index 9fca84d4a33..94c47816c0d 100644 --- a/src/System.Management.Automation/engine/hostifaces/ChoiceDescription.cs +++ b/src/System.Management.Automation/engine/hostifaces/ChoiceDescription.cs @@ -9,7 +9,6 @@ namespace System.Management.Automation.Host /// Provides a description of a choice for use by . /// /// - public sealed class ChoiceDescription { @@ -29,7 +28,6 @@ class ChoiceDescription /// /// is null or empty. /// - public ChoiceDescription(string label) { @@ -59,7 +57,6 @@ class ChoiceDescription /// /// is null. /// - public ChoiceDescription(string label, string helpMessage) { @@ -92,7 +89,6 @@ class ChoiceDescription /// /// For examples, a choice named "Yes to All" might have "Yes to &All" as it's label. /// - public string Label @@ -115,7 +111,6 @@ class ChoiceDescription /// This should be a few sentences to describe the field, suitable for presentation as a tool tip. /// Avoid placing including formatting characters such as newline and tab. /// - public string HelpMessage diff --git a/src/System.Management.Automation/engine/hostifaces/DefaultHost.cs b/src/System.Management.Automation/engine/hostifaces/DefaultHost.cs index 1542ab865f7..e49bafd28da 100644 --- a/src/System.Management.Automation/engine/hostifaces/DefaultHost.cs +++ b/src/System.Management.Automation/engine/hostifaces/DefaultHost.cs @@ -14,7 +14,6 @@ namespace Microsoft.PowerShell /// This is the default host implementing PSHost offering minimal host capabilities. /// Runspace is the primary user of this class. /// - internal class DefaultHost : PSHost { #region ctor @@ -25,7 +24,6 @@ internal class DefaultHost : PSHost /// Current culture for this host. /// Current UI culture for this host. /// - internal DefaultHost(CultureInfo currentCulture, CultureInfo currentUICulture) { CurrentCulture = currentCulture; @@ -70,7 +68,6 @@ internal DefaultHost(CultureInfo currentCulture, CultureInfo currentUICulture) /// /// /// - public override void SetShouldExit(int exitCode) @@ -85,7 +82,6 @@ public override /// /// On calling this method /// - public override void EnterNestedPrompt() @@ -112,7 +108,6 @@ public override /// /// /// - public override void NotifyBeginApplication() @@ -125,7 +120,6 @@ public override /// /// /// - public override void NotifyEndApplication() diff --git a/src/System.Management.Automation/engine/hostifaces/FieldDescription.cs b/src/System.Management.Automation/engine/hostifaces/FieldDescription.cs index 545440a1574..0af791ed829 100644 --- a/src/System.Management.Automation/engine/hostifaces/FieldDescription.cs +++ b/src/System.Management.Automation/engine/hostifaces/FieldDescription.cs @@ -22,7 +22,6 @@ namespace System.Management.Automation.Host /// It is permitted to subclass /// but there is no established scenario for doing this, nor has it been tested. /// - public class FieldDescription { @@ -35,7 +34,6 @@ public class /// /// is null or empty. /// - public FieldDescription(string name) { @@ -69,7 +67,6 @@ public string Name /// /// If is null. /// - public void SetParameterType(System.Type parameterType) @@ -96,7 +93,6 @@ public string Name /// /// - public string ParameterTypeName @@ -123,7 +119,6 @@ public string Name /// /// - public string ParameterTypeFullName @@ -151,7 +146,6 @@ public string Name /// If not already set by a call to , /// will be used as the type. /// - public string ParameterAssemblyFullName @@ -189,7 +183,6 @@ public string Name /// /// If no label is set, then the empty string is returned. /// - public string Label @@ -222,7 +215,6 @@ public string Name /// This should be a few sentences to describe the field, suitable for presentation as a tool tip. /// Avoid placing including formatting characters such as newline and tab. /// - public string HelpMessage @@ -248,7 +240,6 @@ public string Name /// /// Gets and sets whether a value must be supplied for this field. /// - public bool IsMandatory @@ -274,7 +265,6 @@ public string Name /// can make use of the object in its presentation of the fields prompt. /// /// - public PSObject DefaultValue @@ -297,7 +287,6 @@ public string Name /// is being called from the MSH engine, this will contain the set of prompting attributes that are attached to a /// cmdlet parameter declaration. /// - public Collection Attributes @@ -312,7 +301,6 @@ public string Name /// /// If is null. /// - internal void SetParameterTypeName(string nameOfType) @@ -332,7 +320,6 @@ public string Name /// /// If is null. /// - internal void SetParameterTypeFullName(string fullNameOfType) @@ -352,7 +339,6 @@ public string Name /// /// If is null. /// - internal void SetParameterAssemblyFullName(string fullNameOfAssembly) diff --git a/src/System.Management.Automation/engine/hostifaces/History.cs b/src/System.Management.Automation/engine/hostifaces/History.cs index a88692a91e7..278f15aceee 100644 --- a/src/System.Management.Automation/engine/hostifaces/History.cs +++ b/src/System.Management.Automation/engine/hostifaces/History.cs @@ -109,7 +109,6 @@ public override string ToString() /// /// Cleared status of an entry. /// - internal bool Cleared { get; set; } = false; /// @@ -167,7 +166,6 @@ internal class History /// /// Constructs history store. /// - internal History(ExecutionContext context) { // Create history size variable. Add ValidateRangeAttribute to @@ -586,7 +584,6 @@ internal void ClearEntry(long id) /// gets the total number of entries added /// ///count of total entries added. - internal int Buffercapacity() { return _capacity; @@ -1586,7 +1583,6 @@ private static /// /// This Class implements the Clear History cmdlet /// - [Cmdlet(VerbsCommon.Clear, "History", SupportsShouldProcess = true, DefaultParameterSetName = "IDParameter", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=2096691")] public class ClearHistoryCommand : PSCmdlet { @@ -1616,13 +1612,11 @@ public int[] Id /// /// Id of a history entry. /// - private int[] _id; /// /// Command line name of an entry in the session history. /// - [Parameter(ParameterSetName = "CommandLineParameter", HelpMessage = "Specifies the name of a command in the session history")] [ValidateNotNullOrEmpty()] [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] @@ -1642,7 +1636,6 @@ public string[] CommandLine /// /// Commandline parameter. /// - private string[] _commandline = null; /// @@ -1677,7 +1670,6 @@ public int Count /// /// Specifies whether new entries to be cleared or the default old ones. /// - [Parameter(Mandatory = false, HelpMessage = "Specifies whether new entries to be cleared or the default old ones.")] public SwitchParameter Newest { @@ -1695,7 +1687,6 @@ public SwitchParameter Newest /// /// Switch parameter on the history entries. /// - private SwitchParameter _newest; #endregion Command Line Parameters @@ -1703,7 +1694,6 @@ public SwitchParameter Newest /// /// Overriding Begin Processing. /// - protected override void BeginProcessing() { _history = ((LocalRunspace)Context.CurrentRunspace).History; @@ -1712,7 +1702,6 @@ protected override void BeginProcessing() /// /// Overriding Process Record. /// - protected override void ProcessRecord() { // case statement to identify the parameter set @@ -1915,7 +1904,6 @@ private void ClearHistoryByCmdLine() /// Order of the entries. /// Nothing. /// - private void ClearHistoryEntries(long id, int count, string cmdline, SwitchParameter newest) { // if cmdline is null,use default parameter set notion. diff --git a/src/System.Management.Automation/engine/hostifaces/InternalHostRawUserInterface.cs b/src/System.Management.Automation/engine/hostifaces/InternalHostRawUserInterface.cs index d182ef6302a..156d6d58dc8 100644 --- a/src/System.Management.Automation/engine/hostifaces/InternalHostRawUserInterface.cs +++ b/src/System.Management.Automation/engine/hostifaces/InternalHostRawUserInterface.cs @@ -78,7 +78,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override ConsoleColor BackgroundColor @@ -114,7 +113,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override Coordinates CursorPosition @@ -150,7 +148,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override Coordinates WindowPosition @@ -186,7 +183,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override int CursorSize @@ -222,7 +218,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override Size BufferSize @@ -258,7 +253,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override Size WindowSize @@ -294,7 +288,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override Size MaxWindowSize @@ -320,7 +313,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override Size MaxPhysicalWindowSize @@ -348,7 +340,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override KeyInfo ReadKey(ReadKeyOptions options) @@ -386,7 +377,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override void FlushInputBuffer() @@ -407,7 +397,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override bool KeyAvailable @@ -433,7 +422,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override string WindowTitle @@ -495,7 +483,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override void SetBufferContents(Rectangle r, BufferCell fill) @@ -517,7 +504,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override BufferCell[,] GetBufferContents(Rectangle r) @@ -545,7 +531,6 @@ public override /// if the RawUI property of the external host is null, possibly because the PSHostRawUserInterface is not /// implemented by the external host /// - public override void ScrollBufferContents diff --git a/src/System.Management.Automation/engine/hostifaces/InternalHostUserInterface.cs b/src/System.Management.Automation/engine/hostifaces/InternalHostUserInterface.cs index 8432b4432d0..8aa5956e8a8 100644 --- a/src/System.Management.Automation/engine/hostifaces/InternalHostUserInterface.cs +++ b/src/System.Management.Automation/engine/hostifaces/InternalHostUserInterface.cs @@ -67,7 +67,6 @@ class InternalHostUserInterface : PSHostUserInterface, IHostUISupportsMultipleCh /// /// /// - public override System.Management.Automation.Host.PSHostRawUserInterface RawUI @@ -127,7 +126,6 @@ public override /// if the UI property of the external host is null, possibly because the PSHostUserInterface is not /// implemented by the external host. /// - public override SecureString ReadLineAsSecureString() @@ -168,7 +166,6 @@ public override /// if is not null and the UI property of the external host is null, /// possibly because the PSHostUserInterface is not implemented by the external host /// - public override void Write(string value) @@ -199,7 +196,6 @@ public override /// if is not null and the UI property of the external host is null, /// possibly because the PSHostUserInterface is not implemented by the external host /// - public override void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value) @@ -226,7 +222,6 @@ public override /// if the UI property of the external host is null, possibly because the PSHostUserInterface is not /// implemented by the external host /// - public override void WriteLine() @@ -248,7 +243,6 @@ public override /// if is not null and the UI property of the external host is null, /// possibly because the PSHostUserInterface is not implemented by the external host /// - public override void WriteLine(string value) @@ -296,7 +290,6 @@ public override /// if is not null and the UI property of the external host is null, /// possibly because the PSHostUserInterface is not implemented by the external host /// - public override void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value) @@ -321,7 +314,6 @@ public override /// if is not null and the UI property of the external host is null, /// possibly because the PSHostUserInterface is not implemented by the external host /// - public override void WriteDebugLine(string message) @@ -369,7 +361,6 @@ internal void WriteDebugInfoBuffers(DebugRecord record) /// /// If the debug preference is not a valid ActionPreference value. /// - internal void WriteDebugLine(string message, ref ActionPreference preference) @@ -469,7 +460,6 @@ internal PSInformationalBuffers GetInformationalMessageBuffers() /// Preference setting which determines the behaviour. This is by-ref and will be modified based upon what the user /// types. (e.g. YesToAll will change Inquire => NotifyContinue) /// - private bool DebugShouldContinue(string message, ref ActionPreference actionPreference) @@ -539,7 +529,6 @@ internal PSInformationalBuffers GetInformationalMessageBuffers() /// if is not null and the UI property of the external host is null, /// possibly because the PSHostUserInterface is not implemented by the external host /// - public override void WriteProgress(Int64 sourceId, ProgressRecord record) @@ -570,7 +559,6 @@ public override /// if is not null and the UI property of the external host is null, /// possibly because the PSHostUserInterface is not implemented by the external host /// - public override void WriteVerboseLine(string message) @@ -616,7 +604,6 @@ internal void WriteVerboseInfoBuffers(VerboseRecord record) /// if is not null and the UI property of the external host is null, /// possibly because the PSHostUserInterface is not implemented by the external host /// - public override void WriteWarningLine(string message) { if (message == null) @@ -725,7 +712,6 @@ internal static bool IsSecuritySensitiveType(string typeName) /// if the UI property of the external host is null, /// possibly because the PSHostUserInterface is not implemented by the external host /// - public override Dictionary Prompt(string caption, string message, Collection descriptions) @@ -779,7 +765,6 @@ public override /// if the UI property of the external host is null, /// possibly because the PSHostUserInterface is not implemented by the external host /// - public override int PromptForChoice(string caption, string message, Collection choices, int defaultChoice) diff --git a/src/System.Management.Automation/engine/hostifaces/MshHost.cs b/src/System.Management.Automation/engine/hostifaces/MshHost.cs index 0c5ef87436f..64d8f1170f2 100644 --- a/src/System.Management.Automation/engine/hostifaces/MshHost.cs +++ b/src/System.Management.Automation/engine/hostifaces/MshHost.cs @@ -34,7 +34,6 @@ namespace System.Management.Automation.Host /// /// /// - public abstract class PSHost { /// @@ -47,7 +46,6 @@ public abstract class PSHost /// /// Protected constructor which does nothing. Provided per .Net design guidelines section 4.3.1. /// - protected PSHost() { // do nothing @@ -70,7 +68,6 @@ protected PSHost() /// if ($Host.Name -ieq "ConsoleHost") { write-host "I'm running in the Console Host" } /// /// - public abstract string Name { get; @@ -87,7 +84,6 @@ public abstract string Name /// /// The version number of the hosting application. /// - public abstract System.Version Version { get; @@ -97,7 +93,6 @@ public abstract System.Version Version /// Gets a GUID that uniquely identifies this instance of the host. The value should remain invariant for the lifetime of /// this instance. /// - public abstract System.Guid InstanceId { get; @@ -118,7 +113,6 @@ public abstract System.Guid InstanceId /// implementation of PSHostUserInterface for this application. As an alternative, /// for simple scenarios, just returning null is sufficient. /// - public abstract System.Management.Automation.Host.PSHostUserInterface UI { get; @@ -134,7 +128,6 @@ public abstract System.Management.Automation.Host.PSHostUserInterface UI /// The runspace will set the thread current culture to this value each time it starts a pipeline. Thus, cmdlets are /// encouraged to use Thread.CurrentThread.CurrentCulture. /// - public abstract System.Globalization.CultureInfo CurrentCulture { get; @@ -148,7 +141,6 @@ public abstract System.Globalization.CultureInfo CurrentCulture /// /// A CultureInfo object representing the host's current UI culture. Returning null is not allowed. /// - public abstract System.Globalization.CultureInfo CurrentUICulture { get; @@ -167,7 +159,6 @@ public abstract System.Globalization.CultureInfo CurrentUICulture /// The exit code accompanying the exit keyword. Typically, after exiting a runspace, a host will also terminate. The /// exitCode parameter can be used to set the host's process exit code. /// - public abstract void SetShouldExit(int exitCode); /// @@ -188,7 +179,6 @@ public abstract System.Globalization.CultureInfo CurrentUICulture /// evaluates other commands. It does not create a truly new engine instance with new session state.--> /// /// - public abstract void EnterNestedPrompt(); /// @@ -204,7 +194,6 @@ public abstract System.Globalization.CultureInfo CurrentUICulture /// If the UI Property returns a null, the engine should not call this method. /// /// - public abstract void ExitNestedPrompt(); /// @@ -230,7 +219,6 @@ public abstract System.Globalization.CultureInfo CurrentUICulture /// change will not be visible to the host if the host is in another process. Therefore, the implementation of /// get for this property should always return a unique instance. /// - public virtual PSObject PrivateData { get @@ -270,14 +258,12 @@ public virtual PSObject PrivateData /// NotifyBeginApplication. /// /// - public abstract void NotifyBeginApplication(); /// /// Called by the engine to notify the host that the execution of a legacy command has completed. /// /// - public abstract void NotifyEndApplication(); /// diff --git a/src/System.Management.Automation/engine/hostifaces/MshHostRawUserInterface.cs b/src/System.Management.Automation/engine/hostifaces/MshHostRawUserInterface.cs index 79f4bcff66a..f4c3aedfb69 100644 --- a/src/System.Management.Automation/engine/hostifaces/MshHostRawUserInterface.cs +++ b/src/System.Management.Automation/engine/hostifaces/MshHostRawUserInterface.cs @@ -15,7 +15,6 @@ namespace System.Management.Automation.Host /// /// Represents an (x,y) coordinate pair. /// - public struct Coordinates { @@ -68,7 +67,6 @@ public int Y /// /// "a,b" where a and b are the values of the X and Y properties. /// - public override string ToString() @@ -86,7 +84,6 @@ public override /// True if is Coordinates and its X and Y values are the same as those of this instance, /// false if not. /// - public override bool Equals(object obj) @@ -107,7 +104,6 @@ public override /// /// Hash code for this instance. /// - public override int GetHashCode() @@ -173,7 +169,6 @@ public override /// /// true if the respective X and Y values are the same, false otherwise. /// - public static bool operator ==(Coordinates first, Coordinates second) @@ -195,7 +190,6 @@ public static /// /// true if any of the respective either X or Y field is not the same, false otherwise. /// - public static bool operator !=(Coordinates first, Coordinates second) @@ -207,7 +201,6 @@ public static /// /// Represents a width and height pair. /// - public struct Size { @@ -260,7 +253,6 @@ public int Height /// /// "a,b" where a and b are the values of the Width and Height properties. /// - public override string ToString() @@ -278,7 +270,6 @@ public override /// True if is Size and its Width and Height values are the same as those of this instance, /// false if not. /// - public override bool Equals(object obj) @@ -302,7 +293,6 @@ public override /// consider Width the high-order part of a 64-bit in, and /// Height the lower order half. Then use the int64.GetHashCode.--> /// - public override int GetHashCode() @@ -368,7 +358,6 @@ public override /// /// true if the respective Width and Height fields are the same, false otherwise. /// - public static bool operator ==(Size first, Size second) @@ -390,7 +379,6 @@ public static /// /// true if any of the respective Width and Height fields are not the same, false otherwise. /// - public static bool operator !=(Size first, Size second) @@ -403,7 +391,6 @@ public static /// Governs the behavior of /// and /// - [Flags] public enum @@ -412,32 +399,27 @@ public static /// /// Allow Ctrl-C to be processed as a keystroke, as opposed to causing a break event. /// - AllowCtrlC = 0x0001, /// /// Do not display the character for the key in the window when pressed. /// - NoEcho = 0x0002, /// /// Include key down events. Either one of IncludeKeyDown and IncludeKeyUp or both must be specified. /// - IncludeKeyDown = 0x0004, /// /// Include key up events. Either one of IncludeKeyDown and IncludeKeyUp or both must be specified. /// - IncludeKeyUp = 0x0008 } /// /// Defines the states of Control Key. /// - [Flags] public enum ControlKeyStates @@ -445,62 +427,52 @@ enum ControlKeyStates /// /// The right alt key is pressed. /// - RightAltPressed = 0x0001, /// /// The left alt key is pressed. /// - LeftAltPressed = 0x0002, /// /// The right ctrl key is pressed. /// - RightCtrlPressed = 0x0004, /// /// The left ctrl key is pressed. /// - LeftCtrlPressed = 0x0008, /// /// The shift key is pressed. /// - ShiftPressed = 0x0010, /// /// The numlock light is on. /// - NumLockOn = 0x0020, /// /// The scrolllock light is on. /// - ScrollLockOn = 0x0040, /// /// The capslock light is on. /// - CapsLockOn = 0x0080, /// /// The key is enhanced. /// - EnhancedKey = 0x0100 } /// /// Represents information of a keystroke. /// - public struct KeyInfo { @@ -516,7 +488,6 @@ struct KeyInfo /// /// Gets and set device-independent key. /// - public int VirtualKeyCode { get { return virtualKeyCode; } @@ -527,7 +498,6 @@ public int VirtualKeyCode /// /// Gets and set unicode Character of the key. /// - public char Character { get { return character; } @@ -538,7 +508,6 @@ public char Character /// /// State of the control keys. /// - public ControlKeyStates ControlKeyState { get { return controlKeyState; } @@ -549,7 +518,6 @@ public ControlKeyStates ControlKeyState /// /// Gets and set the status of whether this instance is generated by a key pressed or released. /// - public bool KeyDown { get { return keyDown; } @@ -573,7 +541,6 @@ public bool KeyDown /// /// Whether the key is pressed or released /// - public KeyInfo ( @@ -595,7 +562,6 @@ bool keyDown /// /// "a,b,c,d" where a, b, c, and d are the values of the VirtualKeyCode, Character, ControlKeyState, and KeyDown properties. /// - public override string ToString() @@ -612,7 +578,6 @@ public override /// True if is KeyInfo and its VirtualKeyCode, Character, ControlKeyState, and KeyDown values are the /// same as those of this instance, false if not. /// - public override bool Equals(object obj) @@ -637,7 +602,6 @@ public override /// VirtualKeyCode the lower-order nibbles of a 32-bit int, /// Then use the UInt32.GetHashCode.--> /// - public override int GetHashCode() @@ -672,7 +636,6 @@ public override /// are the same, false otherwise. /// /// - public static bool operator ==(KeyInfo first, KeyInfo second) @@ -697,7 +660,6 @@ public static /// are the different, false otherwise. /// /// - public static bool operator !=(KeyInfo first, KeyInfo second) @@ -711,7 +673,6 @@ public static /// /// - public struct Rectangle { @@ -727,7 +688,6 @@ struct Rectangle /// /// Gets and sets the left side of the rectangle. /// - public int Left { get { return left; } @@ -738,7 +698,6 @@ public int Left /// /// Gets and sets the top of the rectangle. /// - public int Top { get { return top; } @@ -749,7 +708,6 @@ public int Top /// /// Gets and sets the right side of the rectangle. /// - public int Right { get { return right; } @@ -760,7 +718,6 @@ public int Right /// /// Gets and sets the bottom of the rectangle. /// - public int Bottom { get { return bottom; } @@ -787,7 +744,6 @@ public int Bottom /// is less than ; /// is less than /// - public Rectangle(int left, int top, int right, int bottom) { @@ -824,7 +780,6 @@ public int Bottom /// The Coordinates of the lower right corner of the Rectangle /// /// - public Rectangle(Coordinates upperLeft, Coordinates lowerRight) : this(upperLeft.X, upperLeft.Y, lowerRight.X, lowerRight.Y) @@ -837,7 +792,6 @@ public int Bottom /// /// "a,b ; c,d" where a, b, c, and d are values of the Left, Top, Right, and Bottom properties. /// - public override string ToString() @@ -855,7 +809,6 @@ public override /// True if is Rectangle and its Left, Top, Right, and Bottom values are the same as those of this instance, /// false if not. /// - public override bool Equals(object obj) @@ -879,7 +832,6 @@ public override /// (Left XOR Right) the lower order half. Then use the int64.GetHashCode.--> /// /// - public override int GetHashCode() @@ -948,7 +900,6 @@ public override /// /// true if the respective Top, Left, Bottom, and Right fields are the same, false otherwise. /// - public static bool operator ==(Rectangle first, Rectangle second) @@ -972,7 +923,6 @@ public static /// true if any of the respective Top, Left, Bottom, and Right fields are not the same, false otherwise. /// /// - public static bool operator !=(Rectangle first, Rectangle second) @@ -984,7 +934,6 @@ public static /// /// Represents a character, a foregroundColor color, and background color. /// - public struct BufferCell { @@ -1000,7 +949,6 @@ struct BufferCell /// /// Gets and sets the character value. /// - public char Character { get { return character; } @@ -1014,7 +962,6 @@ public char Character /// /// Gets and sets the foreground color. /// - public ConsoleColor ForegroundColor { get { return foregroundColor; } @@ -1025,7 +972,6 @@ public ConsoleColor ForegroundColor /// /// Gets and sets the background color. /// - public ConsoleColor BackgroundColor { get { return backgroundColor; } @@ -1036,7 +982,6 @@ public ConsoleColor BackgroundColor /// /// Gets and sets the type value. /// - public BufferCellType BufferCellType { get { return bufferCellType; } @@ -1060,7 +1005,6 @@ public BufferCellType BufferCellType /// /// The type of this BufferCell object /// - public BufferCell(char character, ConsoleColor foreground, ConsoleColor background, BufferCellType bufferCellType) { @@ -1076,7 +1020,6 @@ public BufferCellType BufferCellType /// /// "'a' b c d" where a, b, c, and d are the values of the Character, ForegroundColor, BackgroundColor, and Type properties. /// - public override string ToString() @@ -1094,7 +1037,6 @@ public override /// True if is BufferCell and its Character, ForegroundColor, BackgroundColor, and BufferCellType values /// are the same as those of this instance, false if not. /// - public override bool Equals(object obj) @@ -1118,7 +1060,6 @@ public override /// Hash code for this instance. /// /// - public override int GetHashCode() @@ -1148,7 +1089,6 @@ public override /// /// true if the respective Character, ForegroundColor, BackgroundColor, and BufferCellType values are the same, false otherwise. /// - public static bool operator ==(BufferCell first, BufferCell second) @@ -1174,7 +1114,6 @@ public static /// true if any of the respective Character, ForegroundColor, BackgroundColor, and BufferCellType values are not the same, /// false otherwise. /// - public static bool operator !=(BufferCell first, BufferCell second) @@ -1189,26 +1128,22 @@ public static /// Defines three types of BufferCells to accommodate for hosts that use up to two cells /// to display a character in some languages such as Chinese and Japanese. /// - public enum BufferCellType { /// /// Character occupies one BufferCell. /// - Complete, /// /// Character occupies two BufferCells and this is the leading one. /// - Leading, /// /// Preceded by a Leading BufferCell. /// - Trailing } @@ -1227,14 +1162,12 @@ public enum /// /// /// - public abstract class PSHostRawUserInterface { /// /// Protected constructor which does nothing. Provided per .Net design guidelines section 4.3.1. /// - protected PSHostRawUserInterface() { @@ -1250,7 +1183,6 @@ class PSHostRawUserInterface /// other properties that take structs (e.g. -Position, -Size), I anticipate that the more common use-case for color /// is to just change the foreground color.--> /// - public abstract ConsoleColor ForegroundColor @@ -1264,7 +1196,6 @@ public abstract /// the screen buffer can have a separate background color. /// /// - public abstract ConsoleColor BackgroundColor @@ -1288,7 +1219,6 @@ public abstract /// /// /// - public abstract Coordinates CursorPosition @@ -1305,7 +1235,6 @@ public abstract /// /// /// - public abstract Coordinates WindowPosition @@ -1318,7 +1247,6 @@ public abstract /// Gets or sets the cursor size as a percentage 0..100. /// /// - public abstract int CursorSize @@ -1335,7 +1263,6 @@ public abstract /// /// /// - public abstract Size BufferSize @@ -1353,7 +1280,6 @@ public abstract /// /// /// - public abstract Size WindowSize @@ -1378,7 +1304,6 @@ public abstract /// /// /// - public abstract Size MaxWindowSize @@ -1400,7 +1325,6 @@ public abstract /// /// /// - public abstract Size MaxPhysicalWindowSize @@ -1424,7 +1348,6 @@ public abstract /// /// /// - public KeyInfo ReadKey() @@ -1457,7 +1380,6 @@ public abstract /// /// /// - public abstract KeyInfo ReadKey(ReadKeyOptions options); @@ -1468,7 +1390,6 @@ public abstract /// /// /// - public abstract void FlushInputBuffer(); @@ -1482,7 +1403,6 @@ public abstract /// /// /// - public abstract bool KeyAvailable @@ -1493,7 +1413,6 @@ public abstract /// /// Gets or sets the titlebar text of the current view window. /// - public abstract string WindowTitle @@ -1521,7 +1440,6 @@ public abstract /// /// /// - public abstract void SetBufferContents(Coordinates origin, BufferCell[,] contents); @@ -1566,7 +1484,6 @@ public abstract /// /// /// - public abstract void SetBufferContents(Rectangle rectangle, BufferCell fill); @@ -1605,7 +1522,6 @@ public abstract /// /// /// - public abstract BufferCell[,] GetBufferContents(Rectangle rectangle); @@ -1636,7 +1552,6 @@ public abstract /// /// /// - public abstract void ScrollBufferContents @@ -1670,7 +1585,6 @@ BufferCell fill /// /// /// - public virtual int LengthInBufferCells @@ -1710,7 +1624,6 @@ int offset /// /// /// - public virtual int LengthInBufferCells @@ -1743,7 +1656,6 @@ string source /// /// /// - public virtual int LengthInBufferCells @@ -1912,7 +1824,6 @@ char source /// /// /// - public BufferCell[,] NewBufferCellArray(int width, int height, BufferCell contents) @@ -1994,7 +1905,6 @@ char source /// /// /// - public BufferCell[,] NewBufferCellArray(Size size, BufferCell contents) diff --git a/src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs b/src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs index d30a1f4089b..f40a8350a1e 100644 --- a/src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs +++ b/src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs @@ -23,7 +23,6 @@ namespace System.Management.Automation.Host /// /// /// - public abstract class PSHostUserInterface { /// diff --git a/src/System.Management.Automation/engine/hostifaces/RunspaceInit.cs b/src/System.Management.Automation/engine/hostifaces/RunspaceInit.cs index 04dc65baac2..34244c3db83 100644 --- a/src/System.Management.Automation/engine/hostifaces/RunspaceInit.cs +++ b/src/System.Management.Automation/engine/hostifaces/RunspaceInit.cs @@ -9,7 +9,6 @@ namespace System.Management.Automation.Runspaces /// /// Runspace class for local runspace. /// - internal sealed partial class LocalRunspace : RunspaceBase { diff --git a/src/System.Management.Automation/engine/hostifaces/internalHostuserInterfacesecurity.cs b/src/System.Management.Automation/engine/hostifaces/internalHostuserInterfacesecurity.cs index f5155fd7c13..0aeb89197f1 100644 --- a/src/System.Management.Automation/engine/hostifaces/internalHostuserInterfacesecurity.cs +++ b/src/System.Management.Automation/engine/hostifaces/internalHostuserInterfacesecurity.cs @@ -14,7 +14,6 @@ class InternalHostUserInterface : PSHostUserInterface /// /// See base class. /// - public override PSCredential PromptForCredential @@ -34,7 +33,6 @@ string targetName /// /// See base class. /// - public override PSCredential PromptForCredential diff --git a/src/System.Management.Automation/engine/remoting/client/Job.cs b/src/System.Management.Automation/engine/remoting/client/Job.cs index 6db4da1670c..775886e18c6 100644 --- a/src/System.Management.Automation/engine/remoting/client/Job.cs +++ b/src/System.Management.Automation/engine/remoting/client/Job.cs @@ -2316,7 +2316,6 @@ internal bool HideComputerName /// /// Checks the status of remote command execution. /// - [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] private void SetStatusMessage() { diff --git a/src/System.Management.Automation/engine/remoting/common/WireDataFormat/RemoteSessionCapability.cs b/src/System.Management.Automation/engine/remoting/common/WireDataFormat/RemoteSessionCapability.cs index bc5d47c8a83..86f43cbcc42 100644 --- a/src/System.Management.Automation/engine/remoting/common/WireDataFormat/RemoteSessionCapability.cs +++ b/src/System.Management.Automation/engine/remoting/common/WireDataFormat/RemoteSessionCapability.cs @@ -174,7 +174,6 @@ internal class HostDefaultData /// /// Data. /// - #region DO NOT REMOVE OR RENAME THESE FIELDS - it will break remoting compatibility with Windows PowerShell private Dictionary data; diff --git a/src/System.Management.Automation/engine/remoting/server/serverremotesessionstatemachine.cs b/src/System.Management.Automation/engine/remoting/server/serverremotesessionstatemachine.cs index b943444dd0a..9a77d2a86bd 100644 --- a/src/System.Management.Automation/engine/remoting/server/serverremotesessionstatemachine.cs +++ b/src/System.Management.Automation/engine/remoting/server/serverremotesessionstatemachine.cs @@ -346,7 +346,6 @@ private void DoNegotiationPending(object sender, RemoteSessionStateMachineEventA /// If the parameter is not NegotiationReceived event or it does not hold the /// client negotiation packet. /// - private void DoNegotiationReceived(object sender, RemoteSessionStateMachineEventArgs fsmEventArg) { using (s_trace.TraceEventHandlers()) @@ -386,7 +385,6 @@ private void DoNegotiationReceived(object sender, RemoteSessionStateMachineEvent /// /// If the parameter is null. /// - private void DoNegotiationSending(object sender, RemoteSessionStateMachineEventArgs fsmEventArg) { if (fsmEventArg == null) @@ -413,7 +411,6 @@ private void DoNegotiationSending(object sender, RemoteSessionStateMachineEventA /// /// If the parameter is null. /// - private void DoNegotiationCompleted(object sender, RemoteSessionStateMachineEventArgs fsmEventArg) { using (s_trace.TraceEventHandlers()) @@ -441,7 +438,6 @@ private void DoNegotiationCompleted(object sender, RemoteSessionStateMachineEven /// /// If the parameter is null. /// - private void DoEstablished(object sender, RemoteSessionStateMachineEventArgs fsmEventArg) { using (s_trace.TraceEventHandlers()) diff --git a/src/System.Management.Automation/namespaces/CoreCommandContext.cs b/src/System.Management.Automation/namespaces/CoreCommandContext.cs index 34cdb0d68b7..0bf72583c32 100644 --- a/src/System.Management.Automation/namespaces/CoreCommandContext.cs +++ b/src/System.Management.Automation/namespaces/CoreCommandContext.cs @@ -250,7 +250,6 @@ internal CmdletProviderContext( /// /// If is null. /// - internal CmdletProviderContext( CmdletProviderContext contextToCopyFrom) { diff --git a/src/System.Management.Automation/utils/HostInterfacesExceptions.cs b/src/System.Management.Automation/utils/HostInterfacesExceptions.cs index c67fcd7e1b7..dab2568a2f7 100644 --- a/src/System.Management.Automation/utils/HostInterfacesExceptions.cs +++ b/src/System.Management.Automation/utils/HostInterfacesExceptions.cs @@ -10,7 +10,6 @@ namespace System.Management.Automation.Host /// Defines the exception thrown when the Host cannot complete an operation /// such as checking whether there is any input available. /// - [Serializable] public class HostException : RuntimeException @@ -19,7 +18,6 @@ class HostException : RuntimeException /// /// Initializes a new instance of the HostException class. /// - public HostException() : base( StringUtil.Format(HostInterfaceExceptionsStrings.DefaultCtorMessageTemplate, typeof(HostException).FullName)) @@ -33,7 +31,6 @@ class HostException : RuntimeException /// /// The error message that explains the reason for the exception. /// - public HostException(string message) : base(message) { @@ -52,7 +49,6 @@ class HostException : RuntimeException /// parameter is not a null reference, the current exception is raised in a catch /// block that handles the inner exception. /// - public HostException(string message, Exception innerException) : base(message, innerException) @@ -82,7 +78,6 @@ class HostException : RuntimeException /// /// Intentionally public, third-party hosts can call this /// - public HostException(string message, Exception innerException, string errorId, ErrorCategory errorCategory) : base(message, innerException) @@ -101,7 +96,6 @@ class HostException : RuntimeException /// /// The contextual information about the source or destination. /// - protected HostException(SerializationInfo info, StreamingContext context) : base(info, context) @@ -121,7 +115,6 @@ private void SetDefaultErrorRecord() /// /// Defines the exception thrown when an error occurs from prompting for a command parameter. /// - [Serializable] public class PromptingException : HostException @@ -130,7 +123,6 @@ class PromptingException : HostException /// /// Initializes a new instance of the PromptingException class. /// - public PromptingException() : base(StringUtil.Format(HostInterfaceExceptionsStrings.DefaultCtorMessageTemplate, typeof(PromptingException).FullName)) { @@ -143,7 +135,6 @@ class PromptingException : HostException /// /// The error message that explains the reason for the exception. /// - public PromptingException(string message) : base(message) { @@ -162,7 +153,6 @@ class PromptingException : HostException /// parameter is not a null reference, the current exception is raised in a catch /// block that handles the inner exception. /// - public PromptingException(string message, Exception innerException) : base(message, innerException) @@ -192,7 +182,6 @@ class PromptingException : HostException /// /// Intentionally public, third-party hosts can call this /// - public PromptingException(string message, Exception innerException, string errorId, ErrorCategory errorCategory) : base(message, innerException, errorId, errorCategory) @@ -209,7 +198,6 @@ class PromptingException : HostException /// /// The contextual information about the source or destination. /// - protected PromptingException(SerializationInfo info, StreamingContext context) : base(info, context)