Skip to content
Open
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 @@ -149,7 +149,7 @@ protected override void ProcessRecord()
{
if (IsBlocked(path))
{
UInt32 result = RemoveXattr(path, MacBlockAttribute, RemovexattrFollowSymLink);
uint result = RemoveXattr(path, MacBlockAttribute, RemovexattrFollowSymLink);
if (result != 0)
{
string errorMessage = string.Format(CultureInfo.CurrentUICulture, UnblockFileStrings.UnblockError, path);
Expand Down Expand Up @@ -215,7 +215,7 @@ private static bool IsBlocked(string path)
// Ansi means UTF8 on Unix
// https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/RemoveXattr.2.html
[DllImport("libc", SetLastError = true, EntryPoint = "removexattr", CharSet = CharSet.Ansi)]
private static extern UInt32 RemoveXattr(string path, string name, int options);
private static extern uint RemoveXattr(string path, string name, int options);

[DllImport("libc", EntryPoint = "getxattr", CharSet = CharSet.Ansi)]
private static extern long GetXattr(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ internal override
bool
Visit(ProgressNode node, ArrayList unused, int unusedToo)
{
node.Age = Math.Min(node.Age + 1, Int32.MaxValue - 1);
node.Age = Math.Min(node.Age + 1, int.MaxValue - 1);

node.Style = ProgressNode.IsMinimalProgressRenderingEnabled()
? ProgressNode.RenderStyle.Ansi
Expand Down
2 changes: 1 addition & 1 deletion src/System.Management.Automation/CoreCLR/CorePsStub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ namespace Microsoft.PowerShell
{
internal static class NativeCultureResolver
{
internal static void SetThreadUILanguage(Int16 langId) { }
internal static void SetThreadUILanguage(short langId) { }

internal static CultureInfo UICulture
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ private void CreateBindingResultForSuccessfulBind(CommandAst commandAst, PseudoB
// Check if there is exactly one parameter set valid. In that case,
// ValidParameterSetFlags is exactly a power of two. Otherwise,
// add to the binding exceptions.
bool parameterSetSpecified = bindingInfo.ValidParameterSetsFlags != UInt32.MaxValue;
bool parameterSetSpecified = bindingInfo.ValidParameterSetsFlags != uint.MaxValue;
bool remainingParameterSetIncludesDefault =
(bindingInfo.DefaultParameterSetFlag != 0) &&
((bindingInfo.ValidParameterSetsFlags & bindingInfo.DefaultParameterSetFlag) ==
Expand Down Expand Up @@ -1030,7 +1030,7 @@ internal PseudoBindingInfo DoPseudoParameterBinding(CommandAst command, Type pip
// (x & (x -1 ) == 0) is a bit hack to determine if something is
// exactly a power of two.
bool parameterSetSpecified = (_currentParameterSetFlag != 0) &&
(_currentParameterSetFlag != UInt32.MaxValue);
(_currentParameterSetFlag != uint.MaxValue);
bool onlyOneRemainingParameterSet = (_currentParameterSetFlag != 0) &&
(_currentParameterSetFlag & (_currentParameterSetFlag - 1)) == 0;
if ((bindingType != BindingType.ParameterCompletion) && parameterSetSpecified && (!onlyOneRemainingParameterSet))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public string OutVariable
/// This parameter configures the number of objects to buffer before calling the downstream Cmdlet
/// </remarks>
[Parameter]
[ValidateRange(0, Int32.MaxValue)]
[ValidateRange(0, int.MaxValue)]
[Alias("ob")]
public int OutBuffer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void WriteProgress(ProgressRecord progressRecord) { }
/// </summary>
/// <param name="sourceId">Source ID to write for.</param>
/// <param name="progressRecord">Record to write.</param>
public void WriteProgress(Int64 sourceId, ProgressRecord progressRecord) { }
public void WriteProgress(long sourceId, ProgressRecord progressRecord) { }

/// <summary>
/// Default implementation - just discards it's arguments.
Expand Down
2 changes: 1 addition & 1 deletion src/System.Management.Automation/engine/ErrorPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ private void ConstructFromPSObjectForRemoting(PSObject serializedErrorRecord)
ArrayList iterationInfo = RemotingDecoder.GetPropertyValue<ArrayList>(serializedErrorRecord, "PipelineIterationInfo");
if (iterationInfo != null)
{
_pipelineIterationInfo = new ReadOnlyCollection<int>((int[])iterationInfo.ToArray(typeof(Int32)));
_pipelineIterationInfo = new ReadOnlyCollection<int>((int[])iterationInfo.ToArray(typeof(int)));
}
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public interface ICommandRuntime
/// in a fashion appropriate for the application. For example, a GUI application
/// would implement this as a progress bar of some sort.
/// </remarks>
void WriteProgress(Int64 sourceId, ProgressRecord progressRecord);
void WriteProgress(long sourceId, ProgressRecord progressRecord);

/// <summary>
/// Called when the cmdlet want to display verbose information.
Expand Down
4 changes: 2 additions & 2 deletions src/System.Management.Automation/engine/InternalCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,15 @@ public object[] ArgumentList
/// The default number is 5.
/// </summary>
[Parameter(ParameterSetName = ForEachObjectCommand.ParallelParameterSet)]
[ValidateRange(1, Int32.MaxValue)]
[ValidateRange(1, int.MaxValue)]
public int ThrottleLimit { get; set; } = 5;

/// <summary>
/// Gets or sets a timeout time in seconds, after which the parallel running scripts will be stopped
/// The default value is 0, indicating no timeout.
/// </summary>
[Parameter(ParameterSetName = ForEachObjectCommand.ParallelParameterSet)]
[ValidateRange(0, (Int32.MaxValue / 1000))]
[ValidateRange(0, (int.MaxValue / 1000))]
public int TimeoutSeconds { get; set; }

/// <summary>
Expand Down
Loading
Loading