8000 Removed double spaces from .cs and .ps1 files (#4743) · PowerShell/PowerShell@fb286e6 · GitHub
[go: up one dir, main page]

Skip to conte 8000 nt

Commit fb286e6

Browse files
SteveL-MSFTlzybkr
authored andcommitted
Removed double spaces from .cs and .ps1 files (#4743)
1 parent efa320c commit fb286e6

File tree

136 files changed

+202
-204
lines changed
  • out-console
  • engine
  • namespaces
  • security
  • singleshell/config
  • utils
  • test/powershell
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    136 files changed

    +202
    -204
    lines changed

    src/Microsoft.Management.Infrastructure.CimCmdlets/GetCimClassCommand.cs

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -21,7 +21,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
    2121
    /// classes in the given namespace.
    2222
    /// </para>
    2323
    /// <para>
    24-
    /// NOTES: The class instance contains the Namespace properties
    24+
    /// NOTES: The class instance contains the Namespace properties
    2525
    /// Should the class remember what Session it came from? No.
    2626
    /// </para>
    2727
    /// </summary>

    src/Microsoft.PowerShell.Commands.Diagnostics/PdhHelper.cs

    Lines changed: 0 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1292,8 +1292,6 @@ public uint AddRelogCounters(PerformanceCounterSampleSet sampleSet)
    12921292
    continue;
    12931293
    }
    12941294

    1295-
    //Console.WriteLine ("added pdh query path:" + unifiedPath );
    1296-
    12971295
    //now, add all actual paths to m_ReloggerPathToHandleAndInstanceMap
    12981296
    foreach (PerformanceCounterSample sample in prefixInstanceMap[prefix])
    12991297
    {

    src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs

    Lines changed: 3 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1360,7 +1360,7 @@ private bool IsRestorePointCreated(string description, DateTime starttime)
    13601360
    ObjectQuery objquery = new ObjectQuery();
    13611361
    StringBuilder sb = new StringBuilder("select * from ");
    13621362
    sb.Append(ComputerWMIHelper.WMI_Class_SystemRestore);
    1363-
    sb.Append(" where description = '");
    1363+
    sb.Append(" where description = '");
    13641364
    sb.Append(description.Replace("'", "\\'"));
    13651365
    sb.Append("'");
    13661366
    objquery.QueryString = sb.ToString();
    @@ -1510,7 +1510,7 @@ protected override void BeginProcessing()
    15101510
    // sequenceList = new List<int>();
    15111511
    StringBuilder sb = new StringBuilder("select * from ");
    15121512
    sb.Append(ComputerWMIHelper.WMI_Class_SystemRestore);
    1513-
    sb.Append(" where SequenceNumber = ");
    1513+
    sb.Append(" where SequenceNumber = ");
    15141514
    for (int i = 0; i <= RestorePoint.Length - 1; i++)
    15151515
    {
    15161516
    sb.Append(RestorePoint[i]);
    @@ -1733,7 +1733,7 @@ public enum WaitForServiceTypes
    17331733
    }
    17341734

    17351735
    /// <summary>
    1736-
    /// Restarts the computer
    1736+
    /// Restarts the computer
    17371737
    /// </summary>
    17381738
    [Cmdlet(VerbsLifecycle.Restart, "Computer", SupportsShouldProcess = true, DefaultParameterSetName = DefaultParameterSet,
    17391739
    HelpUri = "https://go.microsoft.com/fwlink/?LinkID=135253", RemotingCapability = RemotingCapability.OwnedByCommand)]

    src/Microsoft.PowerShell.Commands.Management/commands/management/GetComputerInfoCommand.cs

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -3264,7 +3264,7 @@ public class ComputerInfo
    32643264

    32653265
    /// <summary>
    32663266
    /// If a HyperVisor is not present, indicates the state of the
    3267-
    /// requirement that the processor supports Intel or AMD Virtual
    3267+
    /// requirement that the processor supports Intel or AMD Virtual
    32683268
    /// Machine Monitor extensions
    32693269
    /// </summary>
    32703270
    public bool? HyperVRequirementVMMonitorModeExtensions { get; internal set; }

    src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -1519,7 +1519,7 @@ public ServiceStartMode StartupType
    15191519
    /// Paused). If it is already in that state, do nothing. If it is not, do the
    15201520
    /// appropriate action to bring about the desired result (start/stop/suspend the
    15211521
    /// service) and issue an error if this cannot be achieved.
    1522-
    /// Status can be Paused , Running and Stopped
    1522+
    /// Status can be Paused , Running and Stopped
    15231523
    /// </summary>
    15241524
    [Parameter]
    15251525
    [ValidateSetAttribute(new string[] { "Running", "Stopped", "Paused" })]

    src/Microsoft.PowerShell.Commands.Management/commands/management/SetClipboardCommand.cs

    Lines changed: 12 additions & 12 deletions
    Original file line numberDiff line numberDiff line change
    @@ -300,13 +300,13 @@ private void CopyFilesToClipboard(List<string> fileList, bool append, bool isLit
    300300
    }
    301301

    302302
    /// <summary>
    303-
    /// Generate HTML fragment data string with header that is required for the clipboard.
    303+
    /// Generate HTML fragment data string with header that is required for the clipboard.
    304304
    /// </summary>
    305-
    /// <param name="html">the html to generate for</param>
    306-
    /// <returns>the resulted string</returns>
    305+
    /// <param name="html">the html to generate for</param>
    306+
    /// <returns>the resulted string</returns>
    307307
    private static string GetHtmlDataString(string html)
    308308
    {
    309-
    // The string contains index references to other spots in the string, so we need placeholders so we can compute the offsets.
    309+
    // The string contains index references to other spots in the string, so we need placeholders so we can compute the offsets.
    310310
    // The "<<<<<<<<1,<<<<<<<<2, etc" strings are just placeholders. We'll back-patch them actual values within the header location afterwards.
    311311
    const string Header = @"Version:0.9
    312312
    StartHTML:<<<<<<<<1
    @@ -323,7 +323,7 @@ private static string GetHtmlDataString(string html)
    323323
    sb.AppendLine(Header);
    324324
    sb.AppendLine(@"<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">");
    325325

    326-
    // if given html already provided the fragments we won't add them
    326+
    // if given html already provided the fragments we won't add them
    327327
    int fragmentStart, fragmentEnd;
    328328
    int fragmentStartIdx = html.IndexOf(StartFragment, StringComparison.OrdinalIgnoreCase);
    329329
    int fragmentEndIdx = html.LastIndexOf(EndFragment, StringComparison.OrdinalIgnoreCase);
    @@ -343,7 +343,7 @@ private static string GetHtmlDataString(string html)
    343343

    344344
    if (htmlOpenEndIdx < 0 && bodyOpenEndIdx < 0)
    345345
    {
    346-
    // the given html doesn't contain html or body tags so we need to add them and place start/end fragments around the given html only
    346+
    // the given html doesn't contain html or body tags so we need to add them and place start/end fragments around the given html only
    347347
    sb.Append("<html><body>");
    348348
    sb.Append(StartFragment);
    349349
    fragmentStart = GetByteCount(sb);
    @@ -354,7 +354,7 @@ private static string GetHtmlDataString(string html)
    354354
    }
    355355
    else
    356356
    {
    357-
    // insert start/end fragments in the proper place (related to html/body tags if exists) so the paste will work correctly
    357+
    // insert start/end fragments in the proper place (related to html/body tags if exists) so the paste will work correctly
    358358
    //find the index of "</body", ignore white space and case
    359359
    int bodyCloseIdx = Regex.Match(html, @"<\s*/\s*b\s*o\s*d\s*y", RegexOptions.IgnoreCase).Index;
    360360

    @@ -398,12 +398,12 @@ private static string GetHtmlDataString(string html)
    398398
    }
    399399

    400400
    /// <summary>
    401-
    /// Calculates the number of bytes produced by encoding the string in the string builder in UTF-8 and not .NET default string encoding.
    401+
    /// Calculates the number of bytes produced by encoding the string in the string builder in UTF-8 and not .NET default string encoding.
    402402
    /// </summary>
    403-
    /// <param name="sb">the string builder to count its string</param>
    404-
    /// <param name="start">optional: the start index to calculate from (default - start of string)</param>
    405-
    /// <param name="end">optional: the end index to calculate to (default - end of string)</param>
    406-
    /// <returns>the number of bytes required to encode the string in UTF-8</returns>
    403+
    /// <param name="sb">the string builder to count its string</param>
    404+
    /// <param name="start">optional: the start index to calculate from (default - start of string)</param>
    405+
    /// <param name="end">optional: the end index to calculate to (default - end of string)</param>
    406+
    /// <returns>the number of bytes required to encode the string in UTF-8</returns>
    407407
    private static int GetByteCount(StringBuilder sb, int start = 0, int end = -1)
    408408
    {
    409409
    char[] _byteCount = new char[1];

    src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddType.cs

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -1153,7 +1153,7 @@ private string ResolveAssemblyName(string assembly, bool isForReferenceAssembly)
    11531153
    // LoadWithPartialName is deprecated, so we have to write the closest approximation possible.
    11541154
    // However, this does give us a massive usability improvement, as users can just say
    11551155
    // Add-Type -AssemblyName Forms (instead of System.Windows.Forms)
    1156-
    // This is just long, not unmaintainable.
    1156+
    // This is just long, not unmaintainable.
    11571157
    [SuppressMessage("Microsoft.Maintainability", "CA1505:AvoidUnmaintainableCode")]
    11581158
    private Assembly LoadAssemblyHelper(string assemblyName)
    11591159
    {

    src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetMember.cs

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -186,7 +186,7 @@ protected override void ProcessRecord()
    186186
    if (((View & PSMemberViewTypes.Extended) == 0) &&
    187187
    (!typeof(PSMemberSet).ToString().Equals(typeName, StringComparison.OrdinalIgnoreCase)))
    188188
    {
    189-
    // PSMemberSet is an internal memberset and its properties/methods are populated differently.
    189+
    // PSMemberSet is an internal memberset and its properties/methods are populated differently.
    190190
    // PSMemberSet instance is created to represent PSExtended, PSAdapted, PSBase, PSObject hidden
    191191
    // properties. We should honor extended properties for such case.
    192192

    @@ -267,7 +267,7 @@ public int Compare(MemberDefinition first, MemberDefinition second)
    267267

    268268

    269269
    /// <summary>
    270-
    /// This method implements the End method for get-member command
    270+
    /// This method implements the End method for get-member command
    271271
    /// </summary>
    272272
    protected override void EndProcessing()
    273273
    {

    src/Microsoft.PowerShell.Commands.Utility/commands/utility/Measure-Object.cs

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -78,7 +78,7 @@ public GenericMeasureInfo()
    7878
    /// Class output by Measure-Object.
    7979
    /// </summary>
    8080
    /// <remarks>
    81-
    /// This class is created for fixing "Measure-Object -MAX -MIN should work with ANYTHING that supports CompareTo"
    81+
    /// This class is created for fixing "Measure-Object -MAX -MIN should work with ANYTHING that supports CompareTo"
    8282
    /// bug (Win8:343911).
    8383
    /// GenericMeasureInfo class is shipped with PowerShell V2. Fixing this bug requires, changing the type of
    8484
    /// Maximum and Minimum properties which would be a breaking change. Hence created a new class to not
    @@ -546,7 +546,7 @@ private void AnalyzeValue(string propertyName, object objValue)
    546546
    AnalyzeNumber(numValue, stat);
    547547
    }
    548548

    549-
    // Win8:343911 Measure-Object -MAX -MIN should work with ANYTHING that supports CompareTo
    549+
    // Win8:343911 Measure-Object -MAX -MIN should work with ANYTHING that supports CompareTo
    550550
    if (_measureMin)
    551551
    {
    552552
    stat.min = Compare(objValue, stat.min, true);

    src/Microsoft.PowerShell.Commands.Utility/commands/utility/Send-MailMessage.cs

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -124,7 +124,7 @@ public String[] Cc
    124124

    125125
    /// <summary>
    126126
    /// Specifies the delivery notifications options for the e-mail message. The various
    127-
    /// option available for this parameter are None, OnSuccess, OnFailure, Delay and Never
    127+
    /// option available for this parameter are None, OnSuccess, OnFailure, Delay and Never
    128128
    /// </summary>
    129129
    [Parameter()]
    130130
    [Alias("DNO")]
    @@ -189,7 +189,7 @@ public MailPriority Priority
    189189
    private MailPriority _priority;
    190190

    191191
    /// <summary>
    192-
    /// Specifies the subject of the email message.
    192+
    /// Specifies the subject of the email message.
    193193
    /// </summary>
    194194
    [Parameter(Mandatory = true, Position = 1)]
    195195
    [Alias("sub")]

    0 commit comments

    Comments
     (0)
    0