Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/wix/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
<RegistryValue Type="string" Name="InstallDir" Value="[VersionFolder]" KeyPath="yes"/>
</RegistryKey>
</Component>
<!-- Explorer context menu with 2 submenus to open PowerShell normally or as an Administator.
<!-- Explorer context menu with 2 submenus to open PowerShell normally or as an Administrator.
See https://blogs.msdn.microsoft.com/andrew_richards/2017/03/01/enhancing-the-open-command-prompt-here-shift-right-click-context-menu-experience/ for details -->
<Component Id="ExplorerContextMenu">
<Condition>ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL</Condition>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ namespace Microsoft.Management.UI.Internal
{
/// <summary>
/// Builds a paragraph based on Text + Bold + Highlight information.
/// Bold are the segments of thexct that should be bold, and Highlight are
/// the segments of thext that should be highlighted (like search results).
/// Bold are the segments of the text that should be bold, and Highlight are
/// the segments of the text that should be highlighted (like search results).
/// </summary>
internal class ParagraphBuilder : INotifyPropertyChanged
{
Expand Down Expand Up @@ -264,7 +264,7 @@ private static void MoveSpanToPosition(ref int currentSpanIndex, ref TextSpan? c
}

// there is no span ending ahead of current position, so
// we set the current span to null to prevent unecessary comparisons against the currentSpan
// we set the current span to null to prevent unnecessary comparisons against the currentSpan
currentSpan = null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ internal ParagraphSearcher()
/// <returns>The next highlight starting at the <paramref name="caretPosition"/>.</returns>
internal Run MoveAndHighlightNextNextMatch(bool forward, TextPointer caretPosition)
{
Debug.Assert(caretPosition != null, "a caret position is allways valid");
Debug.Assert(caretPosition.Parent != null && caretPosition.Parent is Run, "a caret PArent is allways a valid Run");
Debug.Assert(caretPosition != null, "a caret position is always valid");
Debug.Assert(caretPosition.Parent != null && caretPosition.Parent is Run, "a caret Parent is always a valid Run");
Run caretRun = (Run)caretPosition.Parent;

Run currentRun;
Expand All @@ -59,7 +59,7 @@ internal Run MoveAndHighlightNextNextMatch(bool forward, TextPointer caretPositi
// It has to be in the end because if there is a match at the beginning of the file
// and the caret has not been touched (so it is in the beginning of the file too)
// we want to highlight this first match.
// Considering the caller allways set the caret to the end of the highlight
// Considering the caller always set the caret to the end of the highlight
// The condition below works well for successive searchs
// We also need to move to the adjacent run if the caret is at the first run and we
// are moving backwards so that a search backwards when the first run is highlighted
Expand All @@ -78,15 +78,15 @@ internal Run MoveAndHighlightNextNextMatch(bool forward, TextPointer caretPositi

if (currentRun == null)
{
// if we could not find a next highlight wrap arround
// if we could not find a next highlight wraparound
currentRun = ParagraphSearcher.GetFirstOrLastRun(caretRun, forward);
currentRun = ParagraphSearcher.GetNextMatch(currentRun, forward);
}

this.currentHighlightedMatch = currentRun;
if (this.currentHighlightedMatch != null)
{
// restore the curent highligthed background to current highlighted
// restore the curent highlighted background to current highlighted
this.currentHighlightedMatch.Background = ParagraphSearcher.CurrentHighlightBrush;
}

Expand Down Expand Up @@ -221,7 +221,7 @@ private static bool IsFirstRun(Run run)
/// <returns>The first or last run in the paragraph containing <paramref name="caretRun"/>.</returns>
private static Run GetFirstOrLastRun(Run caretRun, bool forward)
{
Debug.Assert(caretRun != null, "a caret run is allways valid");
Debug.Assert(caretRun != null, "a caret run is always valid");

Paragraph paragraph = GetParagraph(caretRun);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ private void Initialization(Dictionary<string, ShowCommandModuleInfo> importedMo
return;
}

// If there are more modules, create an additional module to agregate all commands
// If there are more modules, create an additional module to aggregate all commands
ModuleViewModel allCommandsModule = new ModuleViewModel(ShowCommandResources.All, null);
this.modules.Add(allCommandsModule);
allCommandsModule.SetAllModules(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ internal static class EnumConverter<T> where T : struct, IConvertible
/// </param>
/// <returns>
/// A Nullable<typeparamref name="T"/> enum object. If the value
/// is convertable to a valid enum value, the returned object's
/// is convertible to a valid enum value, the returned object's
/// value will contain the converted value, otherwise the returned
/// object will be null.
/// </returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ protected override void ProcessRecord()
/// <param name="content">A byte array containing the content data.</param>
/// <returns>The number of bytes written to the requests RequestStream (and the new value of the request's ContentLength property.</returns>
/// <remarks>
/// Because this function sets the request's ContentLength property and writes content data into the requests's stream,
/// Because this function sets the request's ContentLength property and writes content data into the request's stream,
/// it should be called one time maximum on a given request.
/// </remarks>
internal long SetRequestContent(HttpRequestMessage request, byte[] content)
Expand All @@ -1599,7 +1599,7 @@ internal long SetRequestContent(HttpRequestMessage request, byte[] content)
/// <param name="content">A String object containing the content data.</param>
/// <returns>The number of bytes written to the requests RequestStream (and the new value of the request's ContentLength property.</returns>
/// <remarks>
/// Because this function sets the request's ContentLength property and writes content data into the requests's stream,
/// Because this function sets the request's ContentLength property and writes content data into the request's stream,
/// it should be called one time maximum on a given request.
/// </remarks>
internal long SetRequestContent(HttpRequestMessage request, string content)
Expand Down Expand Up @@ -1678,7 +1678,7 @@ internal long SetRequestContent(HttpRequestMessage request, XmlNode xmlNode)
/// <param name="contentStream">A Stream object containing the content data.</param>
/// <returns>The number of bytes written to the requests RequestStream (and the new value of the request's ContentLength property.</returns>
/// <remarks>
/// Because this function sets the request's ContentLength property and writes content data into the requests's stream,
/// Because this function sets the request's ContentLength property and writes content data into the request's stream,
/// it should be called one time maximum on a given request.
/// </remarks>
internal long SetRequestContent(HttpRequestMessage request, Stream contentStream)
Expand All @@ -1700,7 +1700,7 @@ internal long SetRequestContent(HttpRequestMessage request, Stream contentStream
/// <param name="multipartContent">A MultipartFormDataContent object containing multipart/form-data content.</param>
/// <returns>The number of bytes written to the requests RequestStream (and the new value of the request's ContentLength property.</returns>
/// <remarks>
/// Because this function sets the request's ContentLength property and writes content data into the requests's stream,
/// Because this function sets the request's ContentLength property and writes content data into the request's stream,
/// it should be called one time maximum on a given request.
/// </remarks>
internal long SetRequestContent(HttpRequestMessage request, MultipartFormDataContent multipartContent)
Expand Down Expand Up @@ -1808,7 +1808,7 @@ private void AddMultipartContent(object fieldName, object fieldValue, MultipartF
{
foreach (var item in items)
{
// Recruse, but do not enumerate the next level. IEnumerables will be treated as single values.
// Recurse, but do not enumerate the next level. IEnumerables will be treated as single values.
AddMultipartContent(fieldName: fieldName, fieldValue: item, formData: formData, enumerate: false);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2799,7 +2799,7 @@ internal static int LengthInBufferCells(char c)
((uint)(c - 0xffe0) <= (0xffe6 - 0xffe0)));

// We can ignore these ranges because .Net strings use surrogate pairs
// for this range and we do not handle surrogage pairs.
// for this range and we do not handle surrogate pairs.
// (c >= 0x20000 && c <= 0x2fffd) ||
// (c >= 0x30000 && c <= 0x3fffd)
return 1 + (isWide ? 1 : 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ internal override
int invisible = 0;
if (TallyHeight(rawUI, maxHeight, maxWidth) > maxHeight)
{
// This will smash down nodes until the tree will fit into the alloted number of lines. If in the
// This will smash down nodes until the tree will fit into the allotted number of lines. If in the
// process some nodes were made invisible, we will add a line to the display to say so.

invisible = CompressToFit(rawUI, maxHeight, maxWidth);
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.WSMan.Management/WsManHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ internal static void ValidateSpecifiedAuthentication(AuthenticationMechanism aut
if ((credential != null) && (certificateThumbprint != null))
{
string message = FormatResourceMsgFromResourcetextS(
"AmbiguosAuthentication",
"AmbiguousAuthentication",
"CertificateThumbPrint", "credential");

throw new InvalidOperationException(message);
Expand All @@ -626,7 +626,7 @@ internal static void ValidateSpecifiedAuthentication(AuthenticationMechanism aut
(certificateThumbprint != null))
{
string message = FormatResourceMsgFromResourcetextS(
"AmbiguosAuthentication",
"AmbiguousAuthentication",
"CertificateThumbPrint", authentication.ToString());

throw new InvalidOperationException(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Do you want to enable CredSSP authentication?</value>
<data name="NoAttributeMatch" xml:space="preserve">
<value>This command cannot be used because the parameter matches a non-text property on the ResourceURI.Check the input parameters and run your command.</value>
</data>
<data name="AmbiguosAuthentication" xml:space="preserve">
<data name="AmbiguousAuthentication" xml:space="preserve">
<value>A {0} cannot be specified when {1} is specified.</value>
</data>
<data name="InvalidComputerName" xml:space="preserve">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ CredSSPServiceConfigured=This computer is configured to receive credentials from
CredSSPServiceNotConfigured=This computer is not configured to receive credentials from a remote client computer.
QuickConfigContinueCaption=WinRM Quick Configuration
QuickConfigContinueQuery=Running the Set-WSManQuickConfig command has significant security implications, as it enables remote management through the WinRM service on this computer.\nThis command:\n 1. Checks whether the WinRM service is running. If the WinRM service is not running, the service is started.\n 2. Sets the WinRM service startup type to automatic.\n 3. Creates a listener to accept requests on any IP address. By default, the transport is HTTP.\n 4. Enables a firewall exception for WS-Management traffic.\n 5. Enables Kerberos and Negotiate service authentication.\nDo you want to enable remote management through the WinRM service on this computer?
AmbiguosAuthentication=A {0} cannot be specified when {1} is specified.
AmbiguousAuthentication=A {0} cannot be specified when {1} is specified.
CmdletNotAvailable=This PowerShell cmdlet is not available on for Windows XP and Windows Server 2003.
InvalidValueType=This command cannot be used because the parameter value type is invalid. {0} configuration expects a value of Type {1}. Verify that the value is correct and try again.
ClearItemOnRunAsPassword=The RunAsPassword value cannot be removed. Remove the values for RunAsUser and RunAsPassword in PowerShell by calling the Clear-Item cmdlet with the value for -Path attribute equal to the value of RunAsUser.
Expand Down
2 changes: 1 addition & 1 deletion src/System.Management.Automation/CoreCLR/CorePsPlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ internal static partial class NativeMethods
private const string psLib = "libpsl-native";

// Ansi is a misnomer, it is hardcoded to UTF-8 on Linux and macOS
// C bools are 1 byte and so must be marshaled as I1
// C bools are 1 byte and so must be marshalled as I1

[LibraryImport(psLib)]
internal static partial int GetErrorCategory(int errno);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ internal GroupStartData GenerateGroupStartData(PSObject firstObjectInGroup, int

if (formatErrorObject != null && formatErrorObject.exception != null)
{
// if we did no thave any errors in the expression evaluation
// if we did not have any errors in the expression evaluation
// we might have errors in the formatting, if present
_errorManager.LogStringFormatError(formatErrorObject);
if (_errorManager.DisplayFormatErrorString)
Expand Down Expand Up @@ -387,7 +387,7 @@ protected string GetExpressionDisplayValue(PSObject so, int enumerationLimit, PS
}
else if (formatErrorObject != null && formatErrorObject.exception != null)
{
// if we did no thave any errors in the expression evaluation
// if we did not have any errors in the expression evaluation
// we might have errors in the formatting, if present
_errorManager.LogStringFormatError(formatErrorObject);
if (_errorManager.DisplayErrorStrings)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ private void DisplayRawObject(PSObject so, List<FormatValue> formatValueList)

if (formatErrorObject != null && formatErrorObject.exception != null)
{
// if we did no thave any errors in the expression evaluation
// if we did not have any errors in the expression evaluation
// we might have errors in the formatting, if present
_errorManager.LogStringFormatError(formatErrorObject);
if (_errorManager.DisplayFormatErrorString)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// representation that mig have been introduced by serialization.
//
// There is also the need to preserve type information across serialization
// boundaries, therefore the objects provide a GUID based machanism to
// boundaries, therefore the objects provide a GUID based mechanism to
// preserve the information.
//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected static int CharLengthInBufferCells(char c)
((uint)(c - 0xffe0) <= (0xffe6 - 0xffe0)));

// We can ignore these ranges because .Net strings use surrogate pairs
// for this range and we do not handle surrogage pairs.
// for this range and we do not handle surrogate pairs.
// (c >= 0x20000 && c <= 0x2fffd) ||
// (c >= 0x30000 && c <= 0x3fffd)
return 1 + (isWide ? 1 : 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace System.Management.Automation.ComInterop
/// default arguments?). So obj.foo() is ambiguous as it could mean invoking method foo,
/// or it could mean invoking the function pointer returned by property foo.
/// We are attempting to find whether we need to call a method or a property by examining
/// the ITypeInfo associated with the IDispatch. ITypeInfo tell's use what parameters the method
/// the ITypeInfo associated with the IDispatch. ITypeInfo tells us what parameters the method
/// expects, is it a method or a property, what is the default property of the object, how to
/// create an enumerator for collections etc.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ private VariantBuilder GetVariantBuilder(Type argumentType)
if (elementType == typeof(object) || elementType == typeof(DBNull))
{
//no meaningful value to pass ByRef.
//perhaps the calee will replace it with something.
//perhaps the callee will replace it with something.
//need to pass as a variant reference
elementVarEnum = VarEnum.VT_VARIANT;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,7 @@ private static void NativeCommandArgumentCompletion(
string parameterName = parameter.Name;

// Fall back to the commandAst command name if a command name is not found. This can be caused by a script block or AST with the matching function definition being passed to CompleteInput
// This allows for editors and other tools using CompleteInput with Script/AST definations to get values from RegisteredArgumentCompleters to better match the console experience.
// This allows for editors and other tools using CompleteInput with Script/AST definitions to get values from RegisteredArgumentCompleters to better match the console experience.
// See issue https://github.com/PowerShell/PowerShell/issues/10567
string actualCommandName = string.IsNullOrEmpty(commandName)
? commandAst.GetCommandName()
Expand Down Expand Up @@ -4618,7 +4618,7 @@ internal static IEnumerable<CompletionResult> CompleteFilename(CompletionContext
}
catch (Exception)
{
// The object at the specified path is not accessable, such as c:\hiberfil.sys (for hibernation) or c:\pagefile.sys (for paging)
// The object at the specified path is not accessible, such as c:\hiberfil.sys (for hibernation) or c:\pagefile.sys (for paging)
// We ignore those files
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/System.Management.Automation/engine/CoreAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2230,7 +2230,7 @@ internal object Invoke(object target, object[] arguments)
// be thrown when converting arguments to the ByRef-like parameter types.
//
// So when reaching here, we only care about (1) if the method return type is
// BeRef-like; (2) if it's a constrcutor of a ByRef-like type.
// BeRef-like; (2) if it's a constructor of a ByRef-like type.

if (method is ConstructorInfo ctor)
{
Expand Down
Loading