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
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public override void Execute(CmdletOperationBase cmdlet)
/// prompt message
/// </summary>
public string Message
{
{
get
{
return message;
Expand Down
486 changes: 243 additions & 243 deletions src/Microsoft.PowerShell.Commands.Diagnostics/CoreCLR/Stubs.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ private void CopyFilesToClipboard(List<string> fileList, bool append, bool isLit

if (ShouldProcess(setClipboardShouldProcessTarget, "Set-Clipboard"))
{
// Set file list formats to clipboard.
// Set file list formats to clipboard.
Clipboard.Clear();
StringCollection fileDropList = new StringCollection();
fileDropList.AddRange(dropFiles.ToArray());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace Microsoft.Management.UI.Internal
///
/// If a custom template is provided for this control, then the template MUST provide the following template parts:
///
/// PART_Picker - A required template part which must be of type PickerBase. This control provides basic functionality for Picker-like controls.
/// PART_Picker - A required template part which must be of type PickerBase. This control provides basic functionality for Picker-like controls.
///
/// </remarks>
[TemplatePart(Name="PART_Picker", Type=typeof(PickerBase))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ namespace Microsoft.Management.UI.Internal
///
/// If a custom template is provided for this control, then the template MUST provide the following template parts:
///
/// PART_DeleteButton - A required template part which must be of type Button. Button which keeps track of whether the row should be deleted.
/// PART_EditBox - A required template part which must be of type TextBox. Displays the text content in an editable manner.
/// PART_LinkButton - A required template part which must be of type Button. Displays the text content in a read-only manner and allows single click selection.
/// PART_RenameButton - A required template part which must be of type ToggleButton. Button which allows for editing the name of the item.
/// PART_DeleteButton - A required template part which must be of type Button. Button which keeps track of whether the row should be deleted.
/// PART_EditBox - A required template part which must be of type TextBox. Displays the text content in an editable manner.
/// PART_LinkButton - A required template part which must be of type Button. Displays the text content in a read-only manner and allows single click selection.
/// PART_RenameButton - A required template part which must be of type ToggleButton. Button which allows for editing the name of the item.
///
/// </remarks>
[TemplatePart(Name="PART_DeleteButton", Type=typeof(Button))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ namespace Microsoft.Management.UI.Internal
///
/// If a custom template is provided for this control, then the template MUST provide the following template parts:
///
/// PART_DropDown - A required template part which must be of type DismissiblePopup. The dropdown which hosts the picker.
/// PART_DropDownButton - A required template part which must be of type ToggleButton. The ToggleButton which controls whether the dropdown is open.
/// PART_DropDown - A required template part which must be of type DismissiblePopup. The dropdown which hosts the picker.
/// PART_DropDownButton - A required template part which must be of type ToggleButton. The ToggleButton which controls whether the dropdown is open.
///
/// </remarks>
[TemplatePart(Name="PART_DropDown", Type=typeof(DismissiblePopup))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ namespace Microsoft.Management.UI.Internal
///
/// If a custom template is provided for this control, then the template MUST provide the following template parts:
///
/// PART_LeftGrip - A required template part which must be of type Thumb. The grip on the left.
/// PART_RightGrip - A required template part which must be of type Thumb. The grip on the right.
/// PART_LeftGrip - A required template part which must be of type Thumb. The grip on the left.
/// PART_RightGrip - A required template part which must be of type Thumb. The grip on the right.
///
/// </remarks>
[TemplatePart(Name="PART_LeftGrip", Type=typeof(Thumb))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private int CompareData(object firstValue, object secondValue, StringComparison
return LanguagePrimitives.Compare(firstValue, secondValue);
}

// otherwise compare them as strings
// otherwise compare them as strings
return string.Compare(firstValue.ToString(), secondValue.ToString(), stringComparison);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ internal bool PSDefaultActivitiesAreAllowed
{
if (_powerShellActivitiesAreAllowed == null)
{
lock (_syncObject) {
if (_powerShellActivitiesAreAllowed == null)
{
bool allowed = (AllowedActivity ?? new string[0]).Any(a => string.Equals(a, PSDefaultActivities, StringComparison.OrdinalIgnoreCase));
_powerShellActivitiesAreAllowed = allowed;
}
}
lock (_syncObject) {
if (_powerShellActivitiesAreAllowed == null)
{
bool allowed = (AllowedActivity ?? new string[0]).Any(a => string.Equals(a, PSDefaultActivities, StringComparison.OrdinalIgnoreCase));
_powerShellActivitiesAreAllowed = allowed;
}
}
}
return _powerShellActivitiesAreAllowed.Value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,8 @@ protected override string ConstructPrivateData()
if (activityProcessIdleTimeoutSec != PSWorkflowConfigurationProvider.DefaultActivityProcessIdleTimeoutSec)
privateDataParams.Append(string.Format(CultureInfo.InvariantCulture, ParamToken, PSWorkflowConfigurationProvider.TokenActivityProcessIdleTimeoutSec, activityProcessIdleTimeoutSec));

if (workflowApplicationPersistUnloadTimeoutSec != PSWorkflowConfigurationProvider.DefaultWorkflowApplicationPersistUnloadTimeoutSec)
privateDataParams.Append(string.Format(CultureInfo.InvariantCulture, ParamToken, PSWorkflowConfigurationProvider.TokenWorkflowApplicationPersistUnloadTimeoutSec, workflowApplicationPersistUnloadTimeoutSec));
if (workflowApplicationPersistUnloadTimeoutSec != PSWorkflowConfigurationProvider.DefaultWorkflowApplicationPersistUnloadTimeoutSec)
privateDataParams.Append(string.Format(CultureInfo.InvariantCulture, ParamToken, PSWorkflowConfigurationProvider.TokenWorkflowApplicationPersistUnloadTimeoutSec, workflowApplicationPersistUnloadTimeoutSec));

if (wsmanPluginReportCompletionOnZeroActiveSessionsWaitIntervalMSec != PSWorkflowConfigurationProvider.DefaultWSManPluginReportCompletionOnZeroActiveSessionsWaitIntervalMSec)
privateDataParams.Append(string.Format(CultureInfo.InvariantCulture, ParamToken, PSWorkflowConfigurationProvider.TokenWSManPluginReportCompletionOnZeroActiveSessionsWaitIntervalMSec, wsmanPluginReportCompletionOnZeroActiveSessionsWaitIntervalMSec));
Expand All @@ -549,7 +549,7 @@ protected override string ConstructPrivateData()
privateDataParams.Append(string.Format(CultureInfo.InvariantCulture, ParamToken, PSWorkflowConfigurationProvider.TokenActivitiesCacheCleanupIntervalMSec, activitiesCacheCleanupIntervalMSec));

if (remoteNodeSessionIdleTimeoutSec != PSWorkflowConfigurationProvider.DefaultRemoteNodeSessionIdleTimeoutSec)
privateDataParams.Append(string.Format(CultureInfo.InvariantCulture, ParamToken, PSWorkflowConfigurationProvider.TokenRemoteNodeSessionIdleTimeoutSec, remoteNodeSessionIdleTimeoutSec));
privateDataParams.Append(string.Format(CultureInfo.InvariantCulture, ParamToken, PSWorkflowConfigurationProvider.TokenRemoteNodeSessionIdleTimeoutSec, remoteNodeSessionIdleTimeoutSec));

if (sessionThrottleLimit != PSWorkflowConfigurationProvider.DefaultSessionThrottleLimit)
privateDataParams.Append(string.Format(CultureInfo.InvariantCulture, ParamToken, PSWorkflowConfigurationProvider.TokenSessionThrottleLimit, sessionThrottleLimit));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3886,7 +3886,7 @@ private static void InitializeCmdletInstanceParameters(Command command, PSObject
if (!sessionSet)
{
if (cimActivityImplementationContext == null)
throw new ArgumentException(Resources.InvalidImplementationContext);
throw new ArgumentException(Resources.InvalidImplementationContext);

bool useSsl = false;
if (cimActivityImplementationContext.PSUseSsl.HasValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class PSWorkflowRuntime : PSWorkflowHost, IDisposable
private RunspaceProvider _localRunspaceProvider;
private RunspaceProvider _unboundedLocalRunspaceProvider;

private static readonly Tracer _tracer = new Tracer();
private static readonly Tracer _tracer = new Tracer();
private static readonly PSPerfCountersMgr _psPerfCountersMgrInst = PSPerfCountersMgr.Instance;
private readonly PSWorkflowConfigurationProvider _configuration;
private readonly object _syncObject = new object();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Microsoft.PowerShell.Workflow
using System.Diagnostics.CodeAnalysis;
using System.Management.Automation.Tracing;
using Microsoft.PowerShell.Activities;
using System.Management.Automation;
using System.Management.Automation;
using System.Collections.Concurrent;
using System.Reflection;

Expand Down
2 changes: 1 addition & 1 deletion src/ResGen/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static void Main(string[] args)
{
// we are assuming resgen is run with 'dotnet run'
// so we can use relative paths
foreach (string folder in Directory.EnumerateDirectories(".."))
foreach (string folder in Directory.EnumerateDirectories(".."))
{
string moduleName = Path.GetFileName(folder);
string resourcePath = Path.Combine(folder, "resources");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -828,11 +828,11 @@ private static IEnumerable<FormatViewDefinition> ViewsOf_Microsoft_Management_In
.AddHeader(label: "Time(ms)", width: 9)
.StartRowDefinition()
.AddScriptBlockColumn(@"
$sourceName = $_.PSComputerName;
if($sourceName -eq ""."")
{$sourceName = $env:COMPUTERNAME;}
return $sourceName;
")
$sourceName = $_.PSComputerName;
if($sourceName -eq ""."")
{$sourceName = $env:COMPUTERNAME;}
return $sourceName;
")
.AddPropertyColumn("Address")
.AddPropertyColumn("IPV4Address")
.AddPropertyColumn("IPV6Address")
Expand All @@ -853,36 +853,36 @@ private static IEnumerable<FormatViewDefinition> ViewsOf_System_Management_Manag
.AddHeader(label: "RestorePointType", width: 22)
.StartRowDefinition()
.AddScriptBlockColumn(@"
return $_.ConvertToDateTime($_.CreationTime)
")
return $_.ConvertToDateTime($_.CreationTime)
")
.AddPropertyColumn("Description")
.AddPropertyColumn("SequenceNumber")
.AddScriptBlockColumn(@"
$eventType = $_.EventType;
if($_.EventType -eq 100)
{$eventType = ""BEGIN_SYSTEM_CHANGE"";}
if($_.EventType -eq 101)
{$eventType = ""END_SYSTEM_CHANGE"";}
if($_.EventType -eq 102)
{$eventType = ""BEGIN_NESTED_SYSTEM_CHANGE"";}
if($_.EventType -eq 103)
{$eventType = ""END_NESTED_SYSTEM_CHANGE"";}
return $eventType;
")
$eventType = $_.EventType;
if($_.EventType -eq 100)
{$eventType = ""BEGIN_SYSTEM_CHANGE"";}
if($_.EventType -eq 101)
{$eventType = ""END_SYSTEM_CHANGE"";}
if($_.EventType -eq 102)
{$eventType = ""BEGIN_NESTED_SYSTEM_CHANGE"";}
if($_.EventType -eq 103)
{$eventType = ""END_NESTED_SYSTEM_CHANGE"";}
return $eventType;
")
.AddScriptBlockColumn(@"
$RestorePointType = $_.RestorePointType;
if($_.RestorePointType -eq 0)
{ $RestorePointType = ""APPLICATION_INSTALL"";}
if($_.RestorePointType -eq 1)
{ $RestorePointType = ""APPLICATION_UNINSTALL"";}
if($_.RestorePointType -eq 10)
{ $RestorePointType = ""DEVICE_DRIVER_INSTALL"";}
if($_.RestorePointType -eq 12)
{ $RestorePointType = ""MODIFY_SETTINGS"";}
if($_.RestorePointType -eq 13)
{ $RestorePointType = ""CANCELLED_OPERATION"";}
return $RestorePointType;
")
$RestorePointType = $_.RestorePointType;
if($_.RestorePointType -eq 0)
{ $RestorePointType = ""APPLICATION_INSTALL"";}
if($_.RestorePointType -eq 1)
{ $RestorePointType = ""APPLICATION_UNINSTALL"";}
if($_.RestorePointType -eq 10)
{ $RestorePointType = ""DEVICE_DRIVER_INSTALL"";}
if($_.RestorePointType -eq 12)
{ $RestorePointType = ""MODIFY_SETTINGS"";}
if($_.RestorePointType -eq 13)
{ $RestorePointType = ""CANCELLED_OPERATION"";}
return $RestorePointType;
")
.EndRowDefinition()
.EndTable());
}
Expand Down Expand Up @@ -917,13 +917,13 @@ private static IEnumerable<FormatViewDefinition> ViewsOf_Microsoft_Management_In
.AddScriptBlockColumn(@"
$RestorePointType = $_.RestorePointType;
if($_.RestorePointType -eq 0)
{ $RestorePointType = ""APPLICATION_INSTALL"";}
{ $RestorePointType = ""APPLICATION_INSTALL"";}
if($_.RestorePointType -eq 1)
{ $RestorePointType = ""APPLICATION_UNINSTALL"";}
{ $RestorePointType = ""APPLICATION_UNINSTALL"";}
if($_.RestorePointType -eq 10)
{ $RestorePointType = ""DEVICE_DRIVER_INSTALL"";}
{ $RestorePointType = ""DEVICE_DRIVER_INSTALL"";}
if($_.RestorePointType -eq 12)
{ $RestorePointType = ""MODIFY_SETTINGS"";}
{ $RestorePointType = ""MODIFY_SETTINGS"";}
if($_.RestorePointType -eq 13)
{ $RestorePointType = ""CANCELLED_OPERATION"";}
return $RestorePointType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ namespace System.Management.Automation.ComInterop
/// <summary>
/// If a managed user type (as opposed to a primitive type or a COM object) is passed as an argument to a COM call, we need
/// to determine the VarEnum type we will marshal it as. We have the following options:
/// 1. Raise an exception. Languages with their own version of primitive types would not be able to call
/// COM methods using the language's types (for eg. strings in IronRuby are not System.String). An explicit
/// cast would be needed.
/// 2. We could marshal it as VT_DISPATCH. Then COM code will be able to access all the APIs in a late-bound manner,
/// but old COM components will probably malfunction if they expect a primitive type.
/// 3. We could guess which primitive type is the closest match. This will make COM components be as easily
/// accessible as .NET methods.
/// 4. We could use the type library to check what the expected type is. However, the type library may not be available.
/// 1.Raise an exception. Languages with their own version of primitive types would not be able to call
/// COM methods using the language's types (for eg. strings in IronRuby are not System.String). An explicit
/// cast would be needed.
/// 2.We could marshal it as VT_DISPATCH. Then COM code will be able to access all the APIs in a late-bound manner,
/// but old COM components will probably malfunction if they expect a primitive type.
/// 3.We could guess which primitive type is the closest match. This will make COM components be as easily
/// accessible as .NET methods.
/// 4.We could use the type library to check what the expected type is. However, the type library may not be available.
///
/// VarEnumSelector implements option # 3
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5307,7 +5307,7 @@ internal static SessionStateAliasEntry[] BuiltInAliases
"Receive-PSSession", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
new SessionStateAliasEntry("exsn",
"Exit-PSSession", "", ScopedItemOptions.AllScope),
// Win8: 121662/169179 Add "sls" alias for Select-String cmdlet
// Win8: 121662/169179 Add "sls" alias for Select-String cmdlet
// - do not use AllScope - this causes errors in profiles that set this somewhat commonly used alias.
new SessionStateAliasEntry("sls",
"Select-String", "", ScopedItemOptions.None),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private void DoWriteObjects(object sendToPipeline)
ThrowIfWriteNotPermitted(true);
_WriteObjectsSkipAllowCheck(sendToPipeline);
}
// Trust: public void WriteObject(object sendToPipeline, DataTrustCategory trustCategory); // enumerateCollection defaults to false
// Trust: public void WriteObject(object sendToPipeline, DataTrustCategory trustCategory); // enumerateCollection defaults to false
// Trust: public void WriteObject(object sendToPipeline, bool enumerateCollection, DataTrustCategory trustCategory);

// Variables needed to generate a unique SourceId for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ internal static MITypeSerializationInfo GetTypeSerializationInfo(Type type)

//new MITypeSerializationInfo(typeof(SecureString),
// InternalSerializer.WriteSecureString),
};
};

/// <summary>
/// Dictionary of knowntypes.
Expand Down
6 changes: 3 additions & 3 deletions src/System.Management.Automation/engine/TypesV3_Ps1Xml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public static IEnumerable<TypeData> Get()
new ScriptPropertyData(@"ConnectedUser", GetScriptBlock(@"$this.UserInfo.Identity.Name"), null));
td2.Members.Add("RunAsUser",
new ScriptPropertyData(@"RunAsUser", GetScriptBlock(@"if($this.UserInfo.WindowsIdentity -ne $null)
{
$this.UserInfo.WindowsIdentity.Name
}"), null));
{
$this.UserInfo.WindowsIdentity.Name
}"), null));
yield return td2;

var td3 = new TypeData(@"System.Management.Automation.CompletionResult", true);
Expand Down
Loading