8000 Removed double spaces from .cs and .ps1 files by SteveL-MSFT · Pull Request #4743 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Removed double spaces from .cs and .ps1 files #4743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
/// classes in the given namespace.
/// </para>
/// <para>
/// NOTES: The class instance contains the Namespace properties
/// NOTES: The class instance contains the Namespace properties
/// Should the class remember what Session it came from? No.
/// </para>
/// </summary>
Expand Down
2 changes: 0 additions & 2 deletions src/Microsoft.PowerShell.Commands.Diagnostics/PdhHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1292,8 +1292,6 @@ public uint AddRelogCounters(PerformanceCounterSampleSet sampleSet)
continue;
}

//Console.WriteLine ("added pdh query path:" + unifiedPath );

//now, add all actual paths to m_ReloggerPathToHandleAndInstanceMap
foreach (PerformanceCounterSample sample in prefixInstanceMap[prefix])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ private bool IsRestorePointCreated(string description, DateTime starttime)
ObjectQuery objquery = new ObjectQuery();
StringBuilder sb = new StringBuilder("select * from ");
sb.Append(ComputerWMIHelper.WMI_Class_SystemRestore);
sb.Append(" where description = '");
sb.Append(" where description = '");
sb.Append(description.Replace("'", "\\'"));
sb.Append("'");
objquery.QueryString = sb.ToString();
Expand Down Expand Up @@ -1510,7 +1510,7 @@ protected override void BeginProcessing()
// sequenceList = new List<int>();
StringBuilder sb = new StringBuilder("select * from ");
sb.Append(ComputerWMIHelper.WMI_Class_SystemRestore);
sb.Append(" where SequenceNumber = ");
sb.Append(" where SequenceNumber = ");
for (int i = 0; i <= RestorePoint.Length - 1; i++)
{
sb.Append(RestorePoint[i]);
Expand Down Expand Up @@ -1733,7 +1733,7 @@ public enum WaitForServiceTypes
}

/// <summary>
/// Restarts the computer
/// Restarts the computer
/// </summary>
[Cmdlet(VerbsLifecycle.Restart, "Computer", SupportsShouldProcess = true, DefaultParameterSetName = DefaultParameterSet,
HelpUri = "https://go.microsoft.com/fwlink/?LinkID=135253", RemotingCapability = RemotingCapability.OwnedByCommand)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3264,7 +3264,7 @@ public class ComputerInfo

/// <summary>
/// If a HyperVisor is not present, indicates the state of the
/// requirement that the processor supports Intel or AMD Virtual
/// requirement that the processor supports Intel or AMD Virtual
/// Machine Monitor extensions
/// </summary>
public bool? HyperVRequirementVMMonitorModeExtensions { get; internal set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ public ServiceStartMode StartupType
/// Paused). If it is already in that state, do nothing. If it is not, do the
/// appropriate action to bring about the desired result (start/stop/suspend the
/// service) and issue an error if this cannot be achieved.
/// Status can be Paused , Running and Stopped
/// Status can be Paused , Running and Stopped
/// </summary>
[Parameter]
[ValidateSetAttribute(new string[] { "Running", "Stopped", "Paused" })]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,13 @@ private void CopyFilesToClipboard(List<string> fileList, bool append, bool isLit
}

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

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

if (htmlOpenEndIdx < 0 && bodyOpenEndIdx < 0)
{
// 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
// 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
sb.Append("<html><body>");
sb.Append(StartFragment);
fragmentStart = GetByteCount(sb);
Expand All @@ -354,7 +354,7 @@ private static string GetHtmlDataString(string html)
}
else
{
// insert start/end fragments in the proper place (related to html/body tags if exists) so the paste will work correctly
// insert start/end fragments in the proper place (related to html/body tags if exists) so the paste will work correctly
//find the index of "</body", ignore white space and case
int bodyCloseIdx = Regex.Match(html, @"<\s*/\s*b\s*o\s*d\s*y", RegexOptions.IgnoreCase).Index;

Expand Down Expand Up @@ -398,12 +398,12 @@ private static string GetHtmlDataString(string html)
}

/// <summary>
/// Calculates the number of bytes produced by encoding the string in the string builder in UTF-8 and not .NET default string encoding.
/// Calculates the number of bytes produced by encoding the string in the string builder in UTF-8 and not .NET default string encoding.
/// </summary>
/// <param name="sb">the string builder to count its string</param>
/// <param name="start">optional: the start index to calculate from (default - start of string)</param>
/// <param name="end">optional: the end index to calculate to (default - end of string)</param>
/// <returns>the number of bytes required to encode the string in UTF-8</returns>
/// <param name="sb">the string builder to count its string</param>
/// <param name="start">optional: the start index to calculate from (default - start of string)</param>
/// <param name="end">optional: the end index to calculate to (default - end of string)</param>
/// <returns>the number of bytes required to encode the string in UTF-8</returns>
private static int GetByteCount(StringBuilder sb, int start = 0, int end = -1)
{
char[] _byteCount = new char[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ private string ResolveAssemblyName(string assembly, bool isForReferenceAssembly)
// LoadWithPartialName is deprecated, so we have to write the closest approximation possible.
// However, this does give us a massive usability improvement, as users can just say
// Add-Type -AssemblyName Forms (instead of System.Windows.Forms)
// This is just long, not unmaintainable.
// This is just long, not unmaintainable.
[SuppressMessage("Microsoft.Maintainability", "CA1505:AvoidUnmaintainableCode")]
private Assembly LoadAssemblyHelper(string assemblyName)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ protected override void ProcessRecord()
if (((View & PSMemberViewTypes.Extended) == 0) &&
(!typeof(PSMemberSet).ToString().Equals(typeName, StringComparison.OrdinalIgnoreCase)))
{
// PSMemberSet is an internal memberset and its properties/methods are populated differently.
// PSMemberSet is an internal memberset and its properties/methods are populated differently.
// PSMemberSet instance is created to represent PSExtended, PSAdapted, PSBase, PSObject hidden
// properties. We should honor extended properties for such case.

Expand Down Expand Up @@ -267,7 +267,7 @@ public int Compare(MemberDefinition first, MemberDefinition second)


/// <summary>
/// This method implements the End method for get-member command
/// This method implements the End method for get-member command
/// </summary>
protected override void EndProcessing()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public GenericMeasureInfo()
/// Class output by Measure-Object.
/// </summary>
/// <remarks>
/// This class is created for fixing "Measure-Object -MAX -MIN should work with ANYTHING that supports CompareTo"
/// This class is created for fixing "Measure-Object -MAX -MIN should work with ANYTHING that supports CompareTo"
/// bug (Win8:343911).
/// GenericMeasureInfo class is shipped with PowerShell V2. Fixing this bug requires, changing the type of
/// Maximum and Minimum properties which would be a breaking change. Hence created a new class to not
Expand Down Expand Up @@ -546,7 +546,7 @@ private void AnalyzeValue(string propertyName, object objValue)
AnalyzeNumber(numValue, stat);
}

// Win8:343911 Measure-Object -MAX -MIN should work with ANYTHING that supports CompareTo
// Win8:343911 Measure-Object -MAX -MIN should work with ANYTHING that supports CompareTo
if (_measureMin)
{
stat.min = Compare(objValue, stat.min, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public String[] Cc

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

/// <summary>
/// Specifies the subject of the email message.
/// Specifies the subject of the email message.
/// </summary>
[Parameter(Mandatory = true, Position = 1)]
[Alias("sub")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ protected override void StopProcessing()

#region Private Methods
/// <summary>
/// Runs the script in a new PowerShell instance and hooks up error stream to potentially display error popup.
/// Runs the script in a new PowerShell instance and hooks up error stream to potentially display error popup.
/// This method has the inconvenience of not showing to the console user the script being executed.
/// </summary>
/// <param name="script">script to be run</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ protected override void BeginProcessing()
}

/// <summary>
/// This method implements the ProcessRecord method for update-typeData command
/// This method implements the ProcessRecord method for update-typeData command
/// </summary>
protected override void ProcessRecord()
{
Expand All @@ -318,7 +318,7 @@ protected override void ProcessRecord()
}

/// <summary>
/// This method implements the EndProcessing method for update-typeData command
/// This method implements the EndProcessing method for update-typeData command
/// </summary>
protected override void EndProcessing()
{
Expand Down Expand Up @@ -913,7 +913,7 @@ protected override void BeginProcessing()
}

/// <summary>
/// This method implements the ProcessRecord method for update-FormatData command
/// This method implements the ProcessRecord method for update-FormatData command
/// </summary>
protected override void ProcessRecord()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static class UtilityResources
public static string FormatHexPathPrefix { get { return UtilityCommonStrings.FormatHexPathPrefix; } }

/// <summary>
/// Error message to indicate that requested algorithm is not supported on the target platform.
/// Error message to indicate that requested algorithm is not supported on the target platform.
/// </summary>
public static string AlgorithmTypeNotSupported { get { return UtilityCommonStrings.AlgorithmTypeNotSupported; } }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ protected override void StopProcessing()
private CustomSerialization _serializer;

/// <summary>
///Memory Stream used for serialization
/// Memory Stream used for serialization
/// </summary>
private MemoryStream _ms;

Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,7 @@ private void DoRunspaceInitialization(bool importSystemModules, bool skipProfile
// 1. host independent profile meant for all users
// 2. host specific profile meant for all users
// 3. host independent profile of the current user
// 4. host specific profile of the current user
// 4. host specific profile of the current user

var sw = new Stopwatch();
sw.Start();
Expand Down Expand Up @@ -2897,7 +2897,7 @@ private class ConsoleHostStartupException : Exception
base(message)
{
}
#if !CORECLR // ApplicationException & System.Runtime.Serialization.SerializationInfo are Not In CoreCLR
#if !CORECLR // ApplicationException & System.Runtime.Serialization.SerializationInfo are Not In CoreCLR
protected
ConsoleHostStartupException(
System.Runtime.Serialization.SerializationInfo info,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ public override
// Now we check if the bottom right coordinate of our window went over the coordinate of the bottom
// right of the buffer. If it did then we need to adjust the window.

// bufferInfo.BufferSize.X - 1 will give us the rightmost coordinate of the buffer.
// bufferInfo.BufferSize.X - 1 will give us the rightmost coordinate of the buffer.
// r.Right - rightCoordinateOfBuffer will give us how much we need to adjust the window left and right coordinates.
// Then we can do the same for top and bottom.
short adjustLeft = (short)(r.Right - (bufferInfo.BufferSize.X - 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ private PromptCommonInputErrors PromptTryConvertTo(Type fieldType, bool isFromRe
/// If input does not start with PromptCommandPrefix (= "!"), returns input
/// Tilde commands -
/// ! end of list, only valid for input field types that implement IList, returns string.Empty
/// !!* input !* literally, returns !* where * is any string
/// !!* input !* literally, returns !* where * is any string
/// !h prints out field's Quick Help, returns null
/// All others tilde comments are invalid and return null
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ public bool IsEnabled()
/// IsEnabled, method used to test if event is enabled
/// </summary>
/// <param name="level">
/// Level to test
/// Level to test
/// </param>
/// <param name="keywords">
/// Keyword to test
/// Keyword to test
/// </param>
public bool IsEnabled(byte level, long keywords)
{
Expand Down Expand Up @@ -433,13 +433,13 @@ to fill the passed in ETW data descriptor.
/// The activity ID will be propagated only if the call stays on the same native thread as SetActivityId().
/// </summary>
/// <param name="eventMessage">
/// Message to write
/// Message to write
/// </param>
/// <param name="eventLevel">
/// Level to test
/// Level to test
/// </param>
/// <param name="eventKeywords">
/// Keyword to test
/// Keyword to test
/// </param>
[System.Security.SecurityCritical]
public bool WriteMessageEvent(string eventMessage, byte eventLevel, long eventKeywords)
Expand Down Expand Up @@ -569,7 +569,7 @@ public bool WriteEvent(ref EventDescriptor eventDescriptor, string data)
/// number of event descriptors
/// </param>
/// <param name="data">
/// pointer do the event data
/// pointer do the event data
/// </param>
[System.Security.SecurityCritical]
protected bool WriteEvent(ref EventDescriptor eventDescriptor, int dataCount, IntPtr data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ public static void EvtRenderBufferWithContextSystem(EventLogHandle contextHandle
EventLogException.Throw(win32Error);

if (propCount != SYSTEM_PROPERTY_COUNT)
throw new InvalidOperationException("We do not have " + SYSTEM_PROPERTY_COUNT + " variants given for the UnsafeNativeMethods.EvtRenderFlags.EvtRenderEventValues flag. (System Properties)");
throw new InvalidOperationException("We do not have " + SYSTEM_PROPERTY_COUNT + " variants given for the UnsafeNativeMethods.EvtRenderFlags.EvtRenderEventValues flag. (System Properties)");

pointer = buffer;
//read each Variant structure
Expand Down Expand Up @@ -890,7 +890,7 @@ public static void EvtRenderBufferWithContextSystem(EventLogHandle contextHandle
}
}

//EvtRenderContextFlags can be both: EvtRenderContextFlags.EvtRenderContextUser and EvtRenderContextFlags.EvtRenderContextValues
//EvtRenderContextFlags can be both: EvtRenderContextFlags.EvtRenderContextUser and EvtRenderContextFlags.EvtRenderContextValues
//Render with Context = ContextUser or ContextValues (with user defined Xpath query strings)
[System.Security.SecuritySafeCritical]
public static IList<object> EvtRenderBufferWithContextUserOrValues(EventLogHandle contextHandle, EventLogHandle eventHandle)
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.PowerShell.PSReadLine/BasicEditing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ private bool UnresolvedCommandCouldSucceed(string commandName, Ast rootAst)
// This is a little hacky, but we check for a few things where part of the current
// command defines/imports new commands that PowerShell might not yet know about.
// There is little reason to go to great lengths at being correct here, validation
// is just a small usability tweak to avoid cluttering up history - PowerShell
// is just a small usability tweak to avoid cluttering up history - PowerShell
// will report errors for stuff we actually let through.

// Do we define a function matching the command name?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Microsoft.PowerShell.ScheduledJob
{
/// <summary>
/// This cmdlet gets scheduled job option object from a provided ScheduledJobDefinition object.
/// This cmdlet gets scheduled job option object from a provided ScheduledJobDefinition object.
/// </summary>
[Cmdlet(VerbsCommon.Get, "ScheduledJobOption", DefaultParameterSetName = GetScheduledJobOptionCommand.JobDefinitionParameterSet,
HelpUri = "https://go.microsoft.com/fwlink/?LinkID=223920")]
Expand Down
Loading
0