From 79ca486d692b4061e10c6aa1bcbc33264759b2f0 Mon Sep 17 00:00:00 2001 From: Meir Blachman Date: Tue, 27 Nov 2018 18:31:29 +0200 Subject: [PATCH] removed comments after closing brackets --- .../commands/management/AddContentCommand.cs | 6 +- .../management/ClearContentCommand.cs | 8 +- .../management/ClearPropertyCommand.cs | 24 +-- .../commands/management/CombinePathCommand.cs | 8 +- .../management/CommitTransactionCommand.cs | 4 +- .../commands/management/Computer.cs | 4 +- .../commands/management/ContentCommandBase.cs | 22 +-- .../commands/management/ConvertPathCommand.cs | 18 +- .../management/CopyPropertyCommand.cs | 8 +- .../commands/management/Eventlog.cs | 2 +- .../commands/management/GetChildrenCommand.cs | 28 +-- .../management/GetComputerInfoCommand.cs | 2 +- .../commands/management/GetContentCommand.cs | 14 +- .../commands/management/GetPropertyCommand.cs | 42 ++--- .../management/GetTransactionCommand.cs | 4 +- .../management/GetWMIObjectCommand.cs | 8 +- .../management/MovePropertyCommand.cs | 8 +- .../commands/management/NewPropertyCommand.cs | 22 +-- .../commands/management/ParsePathCommand.cs | 18 +- .../PassThroughContentCommandBase.cs | 12 +- .../PassThroughPropertyCommandBase.cs | 14 +- .../commands/management/PingPathCommand.cs | 8 +- .../management/PropertyCommandBase.cs | 22 +-- .../management/RemovePropertyCommand.cs | 20 +-- .../management/RenamePropertyCommand.cs | 20 +-- .../commands/management/ResolvePathCommand.cs | 24 +-- .../management/RollbackTransactionCommand.cs | 4 +- .../commands/management/Service.cs | 50 +++--- .../commands/management/SetContentCommand.cs | 6 +- .../commands/management/SetPropertyCommand.cs | 12 +- .../management/StartTransactionCommand.cs | 4 +- .../management/UseTransactionCommand.cs | 4 +- .../commands/management/WMIHelper.cs | 6 +- .../management/WriteContentCommandBase.cs | 18 +- .../utility/ShowCommand/ShowCommand.cs | 2 +- .../utility/trace/SetTracerCommand.cs | 6 +- .../utility/trace/TraceExpressionCommand.cs | 12 +- .../utility/trace/TraceListenerCommandBase.cs | 12 +- .../host/msh/ConsoleHost.cs | 4 +- .../ScheduledJob.cs | 2 +- .../security/AclCommands.cs | 6 +- .../security/CertificateProvider.cs | 18 +- .../CoreCLR/CorePsPlatform.cs | 2 +- .../common/BaseFormattingCommand.cs | 2 +- .../common/ColumnWidthManager.cs | 2 +- .../DisplayDatabase/typeDataXmlLoader.cs | 14 +- .../typeDataXmlLoader_Complex.cs | 2 +- .../typeDataXmlLoader_Table.cs | 6 +- .../typeDataXmlLoader_Views.cs | 4 +- .../common/FormatViewGenerator_Complex.cs | 2 +- .../engine/AliasInfo.cs | 8 +- .../engine/ApplicationInfo.cs | 6 +- .../engine/AutomationNull.cs | 2 +- .../ChildrenCmdletProviderInterfaces.cs | 24 +-- .../engine/CmdletFamilyProviderInterfaces.cs | 8 +- .../engine/CmdletInfo.cs | 10 +- .../engine/CmdletParameterBinderController.cs | 18 +- .../engine/CommandBase.cs | 20 +-- .../CommandCompletion/CompletionCompleters.cs | 6 +- .../engine/CommandDiscovery.cs | 20 +-- .../engine/CommandInfo.cs | 12 +- .../engine/CommandMetadata.cs | 8 +- .../engine/CommandPathSearch.cs | 16 +- .../engine/CommandProcessor.cs | 2 +- .../engine/CommandProcessorBase.cs | 4 +- .../engine/CommandSearcher.cs | 36 ++-- .../engine/CommonCommandParameters.cs | 4 +- .../engine/CompiledCommandParameter.cs | 2 +- .../engine/ContentCmdletProviderInterfaces.cs | 28 +-- .../engine/CoreAdapter.cs | 4 +- .../engine/DataStoreAdapter.cs | 14 +- .../engine/DataStoreAdapterProvider.cs | 18 +- .../engine/DriveInterfaces.cs | 30 ++-- .../engine/EngineIntrinsics.cs | 14 +- .../engine/ErrorPackage.cs | 18 +- .../engine/ExecutionContext.cs | 4 +- .../engine/ExtendedTypeSystemException.cs | 16 +- .../engine/ExternalScriptInfo.cs | 4 +- .../engine/FilterInfo.cs | 12 +- .../engine/FunctionInfo.cs | 18 +- .../engine/GetCommandCommand.cs | 24 +-- .../engine/ItemCmdletProviderInterfaces.cs | 92 +++++----- .../engine/MergedCommandParameterMetadata.cs | 16 +- .../MinishellParameterBinderController.cs | 2 +- .../Modules/ExportModuleMemberCommand.cs | 2 +- .../engine/Modules/ImportModuleCommand.cs | 2 +- .../engine/Modules/ModuleCmdletBase.cs | 2 +- .../engine/Modules/ModuleIntrinsics.cs | 4 +- .../engine/Modules/ModuleSpecification.cs | 2 +- .../engine/Modules/NewModuleCommand.cs | 2 +- .../Modules/NewModuleManifestCommand.cs | 2 +- .../engine/Modules/PSModuleInfo.cs | 2 +- .../engine/Modules/RemoveModuleCommand.cs | 2 +- .../engine/Modules/ScriptAnalysis.cs | 2 +- .../Modules/TestModuleManifestCommand.cs | 2 +- .../engine/MshCommandRuntime.cs | 50 +++--- .../engine/MshSecurityException.cs | 4 +- .../engine/NativeCommandParameterBinder.cs | 6 +- .../NativeCommandParameterBinderController.cs | 4 +- .../engine/NativeCommandProcessor.cs | 4 +- .../engine/ParameterBinderBase.cs | 16 +- .../engine/ParameterBinderController.cs | 8 +- .../engine/ParameterInfo.cs | 4 +- .../engine/ParameterSetInfo.cs | 4 +- .../engine/ParameterSetSpecificMetadata.cs | 2 +- .../engine/PathInterfaces.cs | 80 ++++----- .../engine/Pipe.cs | 4 +- .../PropertyCmdletProviderInterfaces.cs | 72 ++++---- .../engine/ProviderInterfaces.cs | 16 +- .../engine/PseudoParameterBinder.cs | 10 +- .../engine/PseudoParameters.cs | 6 +- .../engine/ReflectionParameterBinder.cs | 6 +- .../engine/ScopedItemSearcher.cs | 12 +- .../engine/ScriptInfo.cs | 6 +- ...urityDescriptorCmdletProviderInterfaces.cs | 20 +-- .../engine/SessionState.cs | 4 +- .../engine/SessionStateAliasAPIs.cs | 20 +-- .../engine/SessionStateCmdletAPIs.cs | 14 +- .../engine/SessionStateContainer.cs | 108 ++++++------ .../engine/SessionStateContent.cs | 30 ++-- .../engine/SessionStateDriveAPIs.cs | 46 ++--- .../engine/SessionStateDynamicProperty.cs | 50 +++--- .../engine/SessionStateFunctionAPIs.cs | 22 +-- .../engine/SessionStateItem.cs | 40 ++--- .../engine/SessionStateLocationAPIs.cs | 16 +- .../engine/SessionStateNavigation.cs | 32 ++-- .../engine/SessionStateProperty.cs | 30 ++-- .../engine/SessionStateProviderAPIs.cs | 48 ++--- .../engine/SessionStatePublic.cs | 12 +- .../engine/SessionStateScope.cs | 62 +++---- .../engine/SessionStateScopeAPIs.cs | 14 +- .../engine/SessionStateScopeEnumerator.cs | 14 +- ...SessionStateSecurityDescriptorInterface.cs | 20 +-- .../engine/SessionStateUtils.cs | 4 +- .../engine/SessionStateVariableAPIs.cs | 36 ++-- .../engine/ShellVariable.cs | 12 +- .../engine/TransactedString.cs | 2 +- .../engine/TypeMetadata.cs | 8 +- .../engine/UserFeedbackParameters.cs | 4 +- .../engine/VariableInterfaces.cs | 24 +-- .../engine/VariablePath.cs | 2 +- .../engine/WorkflowInfo.cs | 8 +- .../engine/cmdlet.cs | 2 +- .../engine/hostifaces/LocalConnection.cs | 6 +- .../engine/hostifaces/MshHostUserInterface.cs | 2 +- .../engine/hostifaces/PowerShell.cs | 2 +- .../engine/hostifaces/RunspacePoolInternal.cs | 4 +- .../engine/lang/parserutils.cs | 2 +- .../engine/lang/scriptblock.cs | 2 +- .../engine/pipeline.cs | 24 +-- .../engine/regex.cs | 2 +- .../engine/remoting/client/Job.cs | 26 +-- .../client/RemoteRunspacePoolInternal.cs | 8 +- .../remoting/client/RemotingProtocol2.cs | 14 +- ...clientremotesessionprotocolstatemachine.cs | 4 +- .../engine/remoting/client/remotepipeline.cs | 2 +- .../remoting/commands/CustomShellCommands.cs | 6 +- .../remoting/commands/DisconnectPSSession.cs | 2 +- .../engine/remoting/commands/GetJob.cs | 2 +- .../remoting/commands/InvokeCommandCommand.cs | 16 +- .../remoting/commands/PSRemotingCmdlet.cs | 46 ++--- .../remoting/commands/PushRunspaceCommand.cs | 2 +- .../engine/remoting/commands/ReceiveJob.cs | 16 +- .../engine/remoting/commands/RemoveJob.cs | 4 +- .../engine/remoting/commands/StartJob.cs | 8 +- .../remoting/commands/getrunspacecommand.cs | 2 +- .../remoting/commands/newrunspacecommand.cs | 28 +-- .../remoting/common/RemoteSessionNamedPipe.cs | 2 +- .../engine/remoting/common/throttlemanager.cs | 22 +-- .../engine/remoting/fanin/WSManPlugin.cs | 2 +- .../remoting/fanin/WSManPluginFacade.cs | 2 +- .../fanin/WSManPluginTransportManager.cs | 2 +- .../remoting/server/ServerPowerShellDriver.cs | 14 +- .../server/ServerRemotingProtocol2.cs | 4 +- .../server/serverremotesessionstatemachine.cs | 2 +- .../engine/scriptparameterbinder.cs | 6 +- .../engine/serialization.cs | 2 +- .../namespaces/AliasProvider.cs | 16 +- .../namespaces/ContainerProviderBase.cs | 42 ++--- .../namespaces/CoreCommandContext.cs | 62 +++---- .../namespaces/DriveProviderBase.cs | 26 +-- .../namespaces/EnvironmentProvider.cs | 16 +- .../namespaces/FileSystemContentStream.cs | 16 +- .../namespaces/FileSystemProvider.cs | 148 ++++++++-------- .../namespaces/FileSystemSecurity.cs | 2 +- .../namespaces/FunctionProvider.cs | 16 +- .../namespaces/IContentProvider.cs | 4 +- .../namespaces/IContentReader.cs | 4 +- .../namespaces/IContentWriter.cs | 4 +- .../namespaces/IDynamicPropertyProvider.cs | 4 +- .../namespaces/IPermissionProvider.cs | 4 +- .../namespaces/IPropertiesProvider.cs | 4 +- .../namespaces/ItemProviderBase.cs | 40 ++--- .../namespaces/LocationGlobber.cs | 116 ++++++------ .../namespaces/NavigationProviderBase.cs | 36 ++-- .../namespaces/PathInfo.cs | 16 +- .../namespaces/ProviderBase.cs | 166 +++++++++--------- .../namespaces/ProviderBaseSecurity.cs | 4 +- .../ProviderDeclarationAttribute.cs | 8 +- .../namespaces/RegistryProvider.cs | 90 +++++----- .../namespaces/RegistrySecurity.cs | 2 +- .../namespaces/SessionStateProviderBase.cs | 24 +-- .../namespaces/StackInfo.cs | 6 +- .../namespaces/VariableProvider.cs | 16 +- .../security/wldpNativeMethods.cs | 2 +- .../utils/CommandDiscoveryExceptions.cs | 2 +- .../utils/CommandProcessorExceptions.cs | 4 +- .../utils/CryptoUtils.cs | 4 +- .../utils/ExecutionExceptions.cs | 20 +-- .../utils/MshArgumentException.cs | 4 +- .../utils/MshArgumentNullException.cs | 4 +- .../utils/MshArgumentOutOfRangeException.cs | 4 +- .../utils/MshInvalidOperationException.cs | 4 +- .../utils/MshNotImplementedException.cs | 4 +- .../utils/MshNotSupportedException.cs | 4 +- .../utils/MshObjectDisposedException.cs | 4 +- .../utils/ObjectReader.cs | 6 +- .../utils/ObjectStream.cs | 22 +-- .../utils/ParameterBinderExceptions.cs | 2 +- .../utils/ParserException.cs | 4 +- .../utils/PathUtils.cs | 2 +- .../utils/ResourceManagerCache.cs | 6 +- .../utils/RuntimeException.cs | 4 +- .../utils/SessionStateExceptions.cs | 14 +- 224 files changed, 1716 insertions(+), 1716 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/AddContentCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/AddContentCommand.cs index e747867439b..a7df03dd928 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/AddContentCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/AddContentCommand.cs @@ -60,7 +60,7 @@ internal override void SeekContentPosition(List contentHolders) } } } - } // SeekContentPosition + } /// /// Makes the call to ShouldProcess with appropriate action and target strings. @@ -81,6 +81,6 @@ internal override bool CallShouldProcess(string path) } #endregion protected members - } // AddContentCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearContentCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearContentCommand.cs index 57b389142bf..16cdcd1facd 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearContentCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearContentCommand.cs @@ -61,7 +61,7 @@ protected override void ProcessRecord() pathNotFound)); } } - } // ProcessRecord + } #endregion Command code /// @@ -97,7 +97,7 @@ internal override object GetDynamicParameters(CmdletProviderContext context) } return InvokeProvider.Content.ClearContentDynamicParameters(".", context); - } // GetDynamicParameters - } // ClearContentCommand -} // namespace Microsoft.PowerShell.Commands + } + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearPropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearPropertyCommand.cs index 48f96654673..e69bc7ea455 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearPropertyCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/ClearPropertyCommand.cs @@ -26,13 +26,13 @@ public string[] Path get { return paths; - } // get + } set { paths = value; - } // set - } // Path + } + } /// /// Gets or sets the literal path parameter to the command @@ -45,14 +45,14 @@ public string[] LiteralPath get { return paths; - } // get + } set { base.SuppressWildcardExpansion = true; paths = value; - } // set - } // LiteralPath + } + } /// /// The properties to clear from the item @@ -63,13 +63,13 @@ public string Name get { return _property; - } // get + } set { _property = value; } - } // Name + } /// /// A virtual method for retrieving the dynamic parameters for a cmdlet. Derived cmdlets @@ -101,7 +101,7 @@ internal override object GetDynamicParameters(CmdletProviderContext context) ".", propertyCollection, context); - } // GetDynamicParameters + } #endregion Parameters @@ -165,8 +165,8 @@ protected override void ProcessRecord() pathNotFound)); } } - } // ProcessRecord + } #endregion Command code - } // ClearItemPropertyCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/CombinePathCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/CombinePathCommand.cs index be7cda5a31a..3c1421324bc 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/CombinePathCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/CombinePathCommand.cs @@ -203,7 +203,7 @@ protected override void ProcessRecord() pathNotFound)); continue; } - } // for each path + } } else { @@ -213,9 +213,9 @@ protected override void ProcessRecord() } } } - } // ProcessRecord + } #endregion Command code - } // JoinPathCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/CommitTransactionCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/CommitTransactionCommand.cs index 8d583a7fecc..6f1f1127b6b 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/CommitTransactionCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/CommitTransactionCommand.cs @@ -25,6 +25,6 @@ protected override void EndProcessing() this.Context.TransactionManager.Commit(); } } - } // CommitTransactionCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs index 49b8a81e4b3..f04b06e64a3 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs @@ -1528,8 +1528,8 @@ private void DoRenameComputerWsman(string computer, string computerName, string WriteWarning(StringUtil.Format(ComputerResources.RestartNeeded, null, computerName)); } } - } // end foreach - } // end using + } + } } catch (CimException ex) { diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/ContentCommandBase.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/ContentCommandBase.cs index a557390ebc0..e97babef287 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/ContentCommandBase.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/ContentCommandBase.cs @@ -224,7 +224,7 @@ internal void WriteContentObject(object content, long readCount, PathInfo pathIn result.Properties.Add(note, true); WriteObject(result); - } // WriteContentObject + } /// /// A cache of the notes that get added to the content items as they are written @@ -325,8 +325,8 @@ public PSObject AttachNotes(PSObject content) tracer.WriteLine("Attaching {0} = {1}", "PSProvider", Provider); return content; - } // AttachNotes - } // ContentPathsCache + } + } /// /// A struct to hold the path information and the content readers/writers @@ -347,14 +347,14 @@ internal ContentHolder( PathInfo = pathInfo; Reader = reader; Writer = writer; - } // constructor + } internal PathInfo PathInfo { get; } internal IContentReader Reader { get; } internal IContentWriter Writer { get; } - } // struct ContentHolder + } /// /// Closes the content readers and writers in the content holder array @@ -442,7 +442,7 @@ internal void CloseContent(List contentHolders, bool disposing) } } } - } // CloseContent + } /// /// Overridden by derived classes to support ShouldProcess with @@ -539,10 +539,10 @@ internal List GetContentReaders( results.Add(holder); } } - } // foreach pathInfo in pathInfos + } return results; - } // GetContentReaders + } /// /// Resolves the specified paths to PathInfo objects @@ -677,7 +677,7 @@ internal Collection ResolvePaths( } return results; - } // ResolvePaths + } #endregion protected members @@ -710,5 +710,5 @@ public void Dispose() } #endregion IDisposable - } // ContentCommandBase -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/ConvertPathCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/ConvertPathCommand.cs index a2f9d27c1a6..ee8b5f80906 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/ConvertPathCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/ConvertPathCommand.cs @@ -28,13 +28,13 @@ public string[] Path get { return _paths; - } // get + } set { _paths = value; - } // set - } // Path + } + } /// /// Gets or sets the literal path parameter to the command @@ -47,14 +47,14 @@ public string[] LiteralPath get { return _paths; - } // get + } set { base.SuppressWildcardExpansion = true; _paths = value; - } // set - } // LiteralPath + } + } #endregion Parameters @@ -122,9 +122,9 @@ protected override void ProcessRecord() continue; } } - } // ProcessRecord + } #endregion Command code - } // ConvertPathCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/CopyPropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/CopyPropertyCommand.cs index 1aeb978d192..43c3a3d5e44 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/CopyPropertyCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/CopyPropertyCommand.cs @@ -84,7 +84,7 @@ internal override object GetDynamicParameters(CmdletProviderContext context) Destination, Name, context); - } // GetDynamicParameters + } #endregion Parameters @@ -143,8 +143,8 @@ protected override void ProcessRecord() continue; } } - } // ProcessRecord + } #endregion Command code - } // CopyItemPropertyCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Eventlog.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Eventlog.cs index e846c13af7b..c760e02754b 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Eventlog.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Eventlog.cs @@ -307,7 +307,7 @@ protected override void BeginProcessing() } } } - } // ProcessRecord + } #endregion Overrides #region Private diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetChildrenCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetChildrenCommand.cs index 1a41bc08fb5..cd2dfaf6ff1 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetChildrenCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetChildrenCommand.cs @@ -57,14 +57,14 @@ public string[] LiteralPath get { return _paths; - } // get + } set { base.SuppressWildcardExpansion = true; _paths = value; - } // set - } // LiteralPath + } + } /// /// Gets or sets the filter property @@ -91,13 +91,13 @@ public override string[] Include get { return base.Include; - } // get + } set { base.Include = value; - } // set - } // Include + } + } /// /// Gets or sets the exclude property @@ -108,13 +108,13 @@ public override string[] Exclude get { return base.Exclude; - } // get + } set { base.Exclude = value; - } // set - } // Exclude + } + } /// /// Gets or sets the recurse switch @@ -176,7 +176,7 @@ public override SwitchParameter Force { base.Force = value; } - } // Force + } /// /// Gets or sets the names switch @@ -239,7 +239,7 @@ internal override object GetDynamicParameters(CmdletProviderContext context) break; } return result; - } // GetDynamicParameters + } #endregion Command parameters @@ -351,9 +351,9 @@ protected override void ProcessRecord() break; } } - } // ProcessRecord + } #endregion command code - } // class GetChildrenCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetComputerInfoCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetComputerInfoCommand.cs index 93c7e663083..5bfb406a830 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetComputerInfoCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetComputerInfoCommand.cs @@ -198,7 +198,7 @@ protected override void ProcessRecord() systemInfo.networkAdapters = GetNetworkAdapters(session); UpdateProgress(null); // close the progress bar - } // end of using(CimSession...) + } var infoOutput = CreateFullOutputObject(systemInfo, osInfo, miscInfo); diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetContentCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetContentCommand.cs index 57a1aa6cc4b..42f630a509c 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetContentCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetContentCommand.cs @@ -40,14 +40,14 @@ public long TotalCount get { return _totalCount; - } // get + } set { _totalCount = value; _totalCountSpecified = true; } - } // TotalCount + } private bool _totalCountSpecified = false; /// @@ -86,7 +86,7 @@ internal override object GetDynamicParameters(CmdletProviderContext context) return InvokeProvider.Content.GetContentReaderDynamicParameters(Path[0], context); } return InvokeProvider.Content.GetContentReaderDynamicParameters(".", context); - } // GetDynamicParameters + } #endregion Parameters @@ -250,7 +250,7 @@ protected override void ProcessRecord() } } while (results != null && results.Count > 0 && ((TotalCount < 0) || countRead < TotalCount)); } - } // foreach holder in contentStreams + } } finally { @@ -261,7 +261,7 @@ protected override void ProcessRecord() // Empty the content holder array contentStreams = new List(); } - } // ProcessRecord + } /// /// Scan forwards to get the tail content @@ -416,6 +416,6 @@ protected override void EndProcessing() } #endregion Command code - } // GetContentCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetPropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetPropertyCommand.cs index ae71478ad24..342af4d8151 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetPropertyCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetPropertyCommand.cs @@ -26,13 +26,13 @@ public string[] Path get { return paths; - } // get + } set { paths = value; - } // set - } // Path + } + } /// /// Gets or sets the literal path parameter to the command @@ -45,14 +45,14 @@ public string[] LiteralPath get { return paths; - } // get + } set { base.SuppressWildcardExpansion = true; paths = value; - } // set - } // LiteralPath + } + } /// /// The properties to retrieve from the item @@ -64,13 +64,13 @@ public string[] Name get { return _property; - } // get + } set { _property = value; } - } // Property + } /// /// A virtual method for retrieving the dynamic parameters for a cmdlet. Derived cmdlets @@ -95,7 +95,7 @@ internal override object GetDynamicParameters(CmdletProviderContext context) return InvokeProvider.Property.GetPropertyDynamicParameters( ".", SessionStateUtilities.ConvertArrayToCollection(_property), context); - } // GetDynamicParameters + } #endregion Parameters @@ -157,10 +157,10 @@ protected override void ProcessRecord() continue; } } - } // ProcessRecord + } #endregion Command code - } // GetItemPropertyCommand + } /// /// A command to get the property value of an item at a specified path. @@ -181,13 +181,13 @@ public string[] Path get { return paths; - } // get + } set { paths = value; - } // set - } // Path + } + } /// /// Gets or sets the literal path parameter to the command @@ -200,14 +200,14 @@ public string[] LiteralPath get { return paths; - } // get + } set { base.SuppressWildcardExpansion = true; paths = value; - } // set - } // LiteralPath + } + } /// /// The properties to retrieve from the item @@ -220,13 +220,13 @@ public string[] Name get { return _property; - } // get + } set { _property = value; } - } // Property + } /// /// A virtual method for retrieving the dynamic parameters for a cmdlet. Derived cmdlets @@ -251,7 +251,7 @@ internal override object GetDynamicParameters(CmdletProviderContext context) return InvokeProvider.Property.GetPropertyDynamicParameters( ".", SessionStateUtilities.ConvertArrayToCollection(_property), context); - } // GetDynamicParameters + } #endregion Parameters @@ -340,4 +340,4 @@ protected override void ProcessRecord() #endregion Command code } -} // namespace Microsoft.PowerShell.Commands +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetTransactionCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetTransactionCommand.cs index 05216d7e1bc..ba3e2d3dd01 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetTransactionCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetTransactionCommand.cs @@ -20,6 +20,6 @@ protected override void EndProcessing() { WriteObject(this.Context.TransactionManager.GetCurrent()); } - } // GetTransactionCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetWMIObjectCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetWMIObjectCommand.cs index 3488b10e0ea..58eabbb3de2 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/GetWMIObjectCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/GetWMIObjectCommand.cs @@ -399,9 +399,9 @@ protected override void BeginProcessing() WriteError(errorRecord); continue; } - } // foreach computerName + } } - } // BeginProcessing + } /// /// Get the class name from a query string @@ -425,6 +425,6 @@ private string GetClassNameFromQuery(string query) } #endregion Command code - } // GetWmiObjectCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/MovePropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/MovePropertyCommand.cs index affee31d12d..d753f331811 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/MovePropertyCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/MovePropertyCommand.cs @@ -97,7 +97,7 @@ internal override object GetDynamicParameters(CmdletProviderContext context) Destination, propertyName, context); - } // GetDynamicParameters + } #endregion Parameters @@ -159,8 +159,8 @@ protected override void ProcessRecord() } } } - } // ProcessRecord + } #endregion Command code - } // MoveItemPropertyCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs index 3f347c31290..0d4ce0db09a 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/NewPropertyCommand.cs @@ -24,13 +24,13 @@ public string[] Path get { return paths; - } // get + } set { paths = value; - } // set - } // Path + } + } /// /// Gets or sets the literal path parameter to the command @@ -43,14 +43,14 @@ public string[] LiteralPath get { return paths; - } // get + } set { base.SuppressWildcardExpansion = true; paths = value; - } // set - } // LiteralPath + } + } /// /// The name of the property to create on the item @@ -95,7 +95,7 @@ public override SwitchParameter Force { base.Force = value; } - } // Force + } /// /// A virtual method for retrieving the dynamic parameters for a cmdlet. Derived cmdlets @@ -116,7 +116,7 @@ internal override object GetDynamicParameters(CmdletProviderContext context) return InvokeProvider.Property.NewPropertyDynamicParameters(Path[0], Name, PropertyType, Value, context); } return InvokeProvider.Property.NewPropertyDynamicParameters(".", Name, PropertyType, Value, context); - } // GetDynamicParameters + } #endregion Parameters @@ -170,8 +170,8 @@ protected override void ProcessRecord() continue; } } - } // ProcessRecord + } #endregion Command code - } // NewItemPropertyCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/ParsePathCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/ParsePathCommand.cs index 6021c1f04f7..b04d41aed5f 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/ParsePathCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/ParsePathCommand.cs @@ -89,14 +89,14 @@ public string[] LiteralPath get { return Path; - } // get + } set { base.SuppressWildcardExpansion = true; Path = value; - } // set - } // LiteralPath + } + } /// /// Determines if the qualifier should be returned @@ -418,14 +418,14 @@ protected override void ProcessRecord() false, "Only a known parameter set should be called"); break; - } // switch + } if (result != null) { WriteObject(result); } - } // for each path - } // ProcessRecord + } + } #endregion Command code /// @@ -471,7 +471,7 @@ private string RemoveQualifier(string path) } return result; - } // RemoveQualifier - } // SplitPathCommand -} // namespace Microsoft.PowerShell.Commands + } + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughContentCommandBase.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughContentCommandBase.cs index 2461f7a6a79..5fce5ea1f0e 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughContentCommandBase.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughContentCommandBase.cs @@ -23,13 +23,13 @@ public SwitchParameter PassThru get { return _passThrough; - } // get + } set { _passThrough = value; - } // set - } // PassThru + } + } /// /// Determines if the provider for the specified path supports ShouldProcess @@ -70,9 +70,9 @@ internal CmdletProviderContext GetCurrentContext() CmdletProviderContext currentCommandContext = CmdletProviderContext; currentCommandContext.PassThru = PassThru; return currentCommandContext; - } // GetCurrentContext + } #endregion protected members - } // PassThroughContentCommandBase -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughPropertyCommandBase.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughPropertyCommandBase.cs index 5602e96d6e7..fa7a8d7d2e0 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughPropertyCommandBase.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/PassThroughPropertyCommandBase.cs @@ -23,13 +23,13 @@ public SwitchParameter PassThru get { return _passThrough; - } // get + } set { _passThrough = value; - } // set - } // PassThru + } + } /// /// Gets or sets the force property @@ -54,7 +54,7 @@ public override SwitchParameter Force { base.Force = value; } - } // Force + } #endregion Parameters @@ -95,9 +95,9 @@ internal CmdletProviderContext GetCurrentContext() CmdletProviderContext currentCommandContext = CmdletProviderContext; currentCommandContext.PassThru = PassThru; return currentCommandContext; - } // GetCurrentContext + } #endregion protected members - } // PassThroughItemPropertyCommandBase -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/PingPathCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/PingPathCommand.cs index e76695a9047..21d8ab146b9 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/PingPathCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/PingPathCommand.cs @@ -142,7 +142,7 @@ internal override object GetDynamicParameters(CmdletProviderContext context) } return result; - } // GetDynamicParameters + } #endregion Parameters @@ -236,9 +236,9 @@ protected override void ProcessRecord() WriteObject(result); } - } // ProcessRecord + } #endregion Command code - } // PingPathCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/PropertyCommandBase.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/PropertyCommandBase.cs index 9f65a40b9d6..099634eec52 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/PropertyCommandBase.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/PropertyCommandBase.cs @@ -22,13 +22,13 @@ public override string Filter get { return base.Filter; - } // get + } set { base.Filter = value; - } // set - } // Filter + } + } /// /// Gets or sets the include property @@ -39,13 +39,13 @@ public override string[] Include get { return base.Include; - } // get + } set { base.Include = value; - } // set - } // Include + } + } /// /// Gets or sets the exclude property @@ -56,13 +56,13 @@ public override string[] Exclude get { return base.Exclude; - } // get + } set { base.Exclude = value; - } // set - } // Exclude + } + } #endregion Parameters #region parameter data @@ -73,5 +73,5 @@ public override string[] Exclude internal string[] paths = new string[0]; #endregion parameter data - } // ItemPropertyCommandBase -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/RemovePropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/RemovePropertyCommand.cs index 265b7d257ab..6ee903f7aa0 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/RemovePropertyCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/RemovePropertyCommand.cs @@ -25,13 +25,13 @@ public string[] Path get { return paths; - } // get + } set { paths = value; - } // set - } // Path + } + } /// /// Gets or sets the literal path parameter to the command @@ -44,14 +44,14 @@ public string[] LiteralPath get { return paths; - } // get + } set { base.SuppressWildcardExpansion = true; paths = value; - } // set - } // LiteralPath + } + } /// /// The name of the property to create on the item @@ -108,7 +108,7 @@ internal override object GetDynamicParameters(CmdletProviderContext context) return InvokeProvider.Property.RemovePropertyDynamicParameters(Path[0], propertyName, context); } return InvokeProvider.Property.RemovePropertyDynamicParameters(".", propertyName, context); - } // GetDynamicParameters + } #endregion Parameters @@ -170,8 +170,8 @@ protected override void ProcessRecord() } } } - } // ProcessRecord + } #endregion Command code - } // RemoveItemPropertyCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/RenamePropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/RenamePropertyCommand.cs index 3f0f6d433b7..e483852b437 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/RenamePropertyCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/RenamePropertyCommand.cs @@ -25,13 +25,13 @@ public string Path get { return _path; - } // get + } set { _path = value; - } // set - } // Path + } + } /// /// Gets or sets the literal path parameter to the command @@ -44,14 +44,14 @@ public string LiteralPath get { return _path; - } // get + } set { base.SuppressWildcardExpansion = true; _path = value; - } // set - } // LiteralPath + } + } /// /// The properties to be renamed on the item @@ -85,7 +85,7 @@ internal override object GetDynamicParameters(CmdletProviderContext context) return InvokeProvider.Property.RenamePropertyDynamicParameters(Path, Name, NewName, context); } return InvokeProvider.Property.RenamePropertyDynamicParameters(".", Name, NewName, context); - } // GetDynamicParameters + } #endregion Parameters @@ -140,8 +140,8 @@ protected override void ProcessRecord() pathNotFound.ErrorRecord, pathNotFound)); } - } // ProcessRecord + } #endregion Command code - } // RenameItemPropertyCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/ResolvePathCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/ResolvePathCommand.cs index b38bf8ed41e..aa12f541f20 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/ResolvePathCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/ResolvePathCommand.cs @@ -28,13 +28,13 @@ public string[] Path get { return _paths; - } // get + } set { _paths = value; - } // set - } // Path + } + } /// /// Gets or sets the literal path parameter to the command @@ -47,14 +47,14 @@ public string[] LiteralPath get { return _paths; - } // get + } set { base.SuppressWildcardExpansion = true; _paths = value; - } // set - } // LiteralPath + } + } /// /// Gets or sets the value that determines if the resolved path should @@ -66,13 +66,13 @@ public SwitchParameter Relative get { return _relative; - } // get + } set { _relative = value; - } // set - } // Relative + } + } private SwitchParameter _relative; #endregion Parameters @@ -166,9 +166,9 @@ protected override void ProcessRecord() WriteObject(result, enumerateCollection: true); } } - } // ProcessRecord + } #endregion Command code - } // ResolvePathCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/RollbackTransactionCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/RollbackTransactionCommand.cs index 1c586b100c9..92faad03e55 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/RollbackTransactionCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/RollbackTransactionCommand.cs @@ -25,6 +25,6 @@ protected override void EndProcessing() this.Context.TransactionManager.Rollback(); } } - } // RollbackTransactionCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs index fbc2841f34f..27bde24aa1a 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Service.cs @@ -112,7 +112,7 @@ internal void WriteNonTerminatingError( } #endregion Internal - } // class ServiceBaseCommand + } #endregion ServiceBaseCommand #region MultipleServiceCommandBase @@ -313,7 +313,7 @@ internal List MatchingServices() // before being stopped. JimTru confirms that this is OK. matchingServices.Sort(ServiceComparison); return matchingServices; - } // MatchingServices + } // sort by servicename private static int ServiceComparison(ServiceController x, ServiceController y) @@ -386,7 +386,7 @@ private List MatchingServicesByServiceName() } } return matchingServices; - } // MatchingServicesByServiceName + } /// /// Retrieves the list of all services matching the DisplayName, @@ -429,7 +429,7 @@ private List MatchingServicesByDisplayName() } } return matchingServices; - } // MatchingServicesByDisplayName + } /// /// Retrieves the list of all services matching the InputObject, @@ -450,7 +450,7 @@ private List MatchingServicesByInput() IncludeExcludeAdd(matchingServices, service, false); } return matchingServices; - } // MatchingServicesByInput + } /// /// Add to , @@ -508,7 +508,7 @@ private bool Matches(ServiceController service, string[] matchList) } #endregion Internal - } // class MultipleServiceCommandBase + } #endregion MultipleServiceCommandBase #region GetServiceCommand @@ -699,7 +699,7 @@ private PSObject AddProperties(ServiceController service) Diagnostics.Assert(lastError != 0, "ErrorCode not success"); } } - } // finally + } return serviceAsPSObj; } } @@ -1263,8 +1263,8 @@ protected override void ProcessRecord() } } } - } // ProcessRecord - } // StopServiceCommand + } + } #endregion StopServiceCommand #region StartServiceCommand @@ -1295,8 +1295,8 @@ protected override void ProcessRecord() WriteObject(serviceController); } } - } // ProcessRecord - } // class StartServiceCommand + } + } #endregion StartServiceCommand #region SuspendServiceCommand @@ -1327,8 +1327,8 @@ protected override void ProcessRecord() WriteObject(serviceController); } } - } // ProcessRecord - } // class SuspendServiceCommand + } + } #endregion SuspendServiceCommand #region ResumeServiceCommand @@ -1359,8 +1359,8 @@ protected override void ProcessRecord() WriteObject(serviceController); } } - } // ProcessRecord - } // class ResumeServiceCommand + } + } #endregion ResumeServiceCommand #region RestartServiceCommand @@ -1413,8 +1413,8 @@ protected override void ProcessRecord() } } } - } // ProcessRecord - } // RestartServiceCommand + } + } #endregion RestartServiceCommand #region SetServiceCommand @@ -1725,7 +1725,7 @@ protected override void ProcessRecord() ErrorCategory.PermissionDenied); return; } - } // modify startup type or display name + } NativeMethods.SERVICE_DESCRIPTIONW sd = new NativeMethods.SERVICE_DESCRIPTIONW(); sd.lpDescription = Description; @@ -1860,7 +1860,7 @@ protected override void ProcessRecord() ErrorCategory.PermissionDenied); } } - } // finally + } } //End try finally { @@ -1876,7 +1876,7 @@ protected override void ProcessRecord() } #endregion Overrides - } // class SetServiceCommand + } #endregion SetServiceCommand #region NewServiceCommand @@ -2210,7 +2210,7 @@ protected override void BeginProcessing() } } #endregion Overrides - } // class NewServiceCommand + } #endregion NewServiceCommand #region RemoveServiceCommand @@ -2367,8 +2367,8 @@ protected override void ProcessRecord() Diagnostics.Assert(lastError != 0, "ErrorCode not success"); } } - } // Finally - } // End try + } + } finally { if (objServiceShouldBeDisposed) @@ -2378,7 +2378,7 @@ protected override void ProcessRecord() } } #endregion Overrides - } // class RemoveServiceCommand + } #endregion RemoveServiceCommand #region ServiceCommandException @@ -2467,7 +2467,7 @@ public string ServiceName } private string _serviceName = String.Empty; #endregion Properties - } // class ServiceCommandException + } #endregion ServiceCommandException #region NativeMethods diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/SetContentCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/SetContentCommand.cs index 5f24c236604..5d7f1915ace 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/SetContentCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/SetContentCommand.cs @@ -67,7 +67,7 @@ internal override void BeforeOpenStreams(string[] paths) continue; } } - } // BeforeOpenStreams + } /// /// Makes the call to ShouldProcess with appropriate action and target strings. @@ -87,6 +87,6 @@ internal override bool CallShouldProcess(string path) return ShouldProcess(target, action); } #endregion protected members - } // SetContentCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/SetPropertyCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/SetPropertyCommand.cs index 40f4200b97e..c3d6b67db22 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/SetPropertyCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/SetPropertyCommand.cs @@ -128,14 +128,14 @@ internal override object GetDynamicParameters(CmdletProviderContext context) default: mshObject = InputObject; break; - } // switch + } if (Path != null && Path.Length > 0) { return InvokeProvider.Property.SetPropertyDynamicParameters(Path[0], mshObject, context); } return InvokeProvider.Property.SetPropertyDynamicParameters(".", mshObject, context); - } // GetDynamicParameters + } #endregion Parameters @@ -175,7 +175,7 @@ protected override void ProcessRecord() false, "One of the parameter sets should have been resolved or an error should have been thrown by the command processor"); break; - } // switch + } foreach (string path in Path) { @@ -216,8 +216,8 @@ protected override void ProcessRecord() continue; } } - } // ProcessRecord + } #endregion Command code - } // SetItemPropertyCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/StartTransactionCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/StartTransactionCommand.cs index a2eb9469891..d39f5036caa 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/StartTransactionCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/StartTransactionCommand.cs @@ -98,6 +98,6 @@ protected override void EndProcessing() } } } - } // StartTransactionCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/UseTransactionCommand.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/UseTransactionCommand.cs index 43b722d08f7..329b577dcf7 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/UseTransactionCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/UseTransactionCommand.cs @@ -86,6 +86,6 @@ protected override void EndProcessing() } } } - } // CommitTransactionCommand -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/WMIHelper.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/WMIHelper.cs index 0d990b5ddab..eacdadb25d2 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/WMIHelper.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/WMIHelper.cs @@ -174,7 +174,7 @@ internal void RaiseOperationCompleteEvent(EventArgs baseEventArgs, OperationStat OperationStateEventArgs operationStateEventArgs = new OperationStateEventArgs(); operationStateEventArgs.OperationState = state; OperationComplete.SafeInvoke(this, operationStateEventArgs); - } // RaiseOperationCompleteEvent + } /// /// Raise WMI state changed event @@ -1553,7 +1553,7 @@ public override string StatusMessage private void SetStatusMessage() { _statusMessage = "test"; - } // SetStatusMessage + } private bool _moreData = false; /// @@ -2016,6 +2016,6 @@ private void HandleThrottleComplete(object sender, EventArgs eventArgs) SetJobState(JobState.Stopped, _helper.InternalException); } //Do Nothing - } // HandleThrottleComplete + } } } diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/WriteContentCommandBase.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/WriteContentCommandBase.cs index 7f735d227eb..2087f6e5e91 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/WriteContentCommandBase.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/WriteContentCommandBase.cs @@ -32,13 +32,13 @@ public object[] Value get { return _content; - } // get + } set { _content = value; } - } // Value + } #endregion Parameters @@ -184,7 +184,7 @@ protected override void ProcessRecord() contentStreams = new List(); } } - } // ProcessRecord + } /// /// Closes all the content writers @@ -192,7 +192,7 @@ protected override void ProcessRecord() protected override void EndProcessing() { Dispose(true); - } // EndProcessing + } #endregion Command code @@ -209,7 +209,7 @@ protected override void EndProcessing() internal virtual void SeekContentPosition(List contentHolders) { // default does nothing. - } // SeekContentPosition + } /// /// Called by the base class before the streams are open for the path. @@ -316,10 +316,10 @@ internal List GetContentWriters( results.Add(holder); } } - } // foreach pathInfo in pathInfos + } return results; - } // GetContentWriters + } /// /// Gets the list of paths accepted by the user @@ -345,5 +345,5 @@ private string[] GetAcceptedPaths(string[] unfilteredPaths, CmdletProviderContex } #endregion protected members - } // WriteContentCommandBase -} // namespace Microsoft.PowerShell.Commands + } +} diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommand.cs index 4921775d1af..4ea4f5eaf15 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommand.cs @@ -116,7 +116,7 @@ public SwitchParameter PassThru { get { return _passThrough; } set { _passThrough = value; } - } // PassThru + } #endregion #region Public and Protected Methods diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/SetTracerCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/SetTracerCommand.cs index 25fb830b3a2..f8ab3cb6dcc 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/SetTracerCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/SetTracerCommand.cs @@ -63,7 +63,7 @@ public string FilePath { get { return base.FileListener; } set { base.FileListener = value; } - } // File + } /// /// Force parameter to control read-only files. @@ -121,7 +121,7 @@ public SwitchParameter PassThru { get { return _passThru; } set { _passThru = value; } - } // Passthru + } private bool _passThru; #endregion Parameters @@ -158,7 +158,7 @@ protected override void ProcessRecord() RemoveListenersByName(matchingSources, RemoveFileListener, true); break; } - } // ProcessRecord + } #endregion Cmdlet code } diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceExpressionCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceExpressionCommand.cs index 87b4e69a4f9..e6098c38a9d 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceExpressionCommand.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceExpressionCommand.cs @@ -51,7 +51,7 @@ public PSTraceSourceOptions Option { base.OptionsInternal = value; } - } // Options + } /// /// The parameter for the expression that should be traced. @@ -98,7 +98,7 @@ public string FilePath { get { return base.FileListener; } set { base.FileListener = value; } - } // File + } /// /// Force parameter to control read-only files. @@ -119,7 +119,7 @@ public SwitchParameter Debugger { get { return base.DebuggerListener; } set { base.DebuggerListener = value; } - } // Debugger + } /// /// If this parameter is specified the Msh Host trace listener will be added. @@ -130,7 +130,7 @@ public SwitchParameter PSHost { get { return base.PSHostListener; } set { base.PSHostListener = value; } - } // PSHost + } #endregion Parameters @@ -210,7 +210,7 @@ protected override void ProcessRecord() { WriteObject(result, true); } - } // ProcessRecord + } /// /// Finishes running the command if specified and then sets the @@ -301,7 +301,7 @@ public void Dispose() } GC.SuppressFinalize(this); } - } // Dispose + } private bool _disposed; #endregion IDisposable } diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceListenerCommandBase.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceListenerCommandBase.cs index 73ba4b3756c..28b4af6489e 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceListenerCommandBase.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/trace/TraceListenerCommandBase.cs @@ -39,7 +39,7 @@ internal PSTraceSourceOptions OptionsInternal _options = value; optionsSpecified = true; } - } // Flags + } private PSTraceSourceOptions _options = PSTraceSourceOptions.All; /// @@ -70,7 +70,7 @@ internal TraceOptions ListenerOptionsInternal /// Adds the file trace listener using the specified file. /// /// - internal string FileListener { get; set; } // File + internal string FileListener { get; set; } /// /// Property that sets force parameter. This will clear the @@ -79,13 +79,13 @@ internal TraceOptions ListenerOptionsInternal /// /// Note that we do not attempt to reset the read-only attribute. /// - public bool ForceWrite { get; set; } // Force + public bool ForceWrite { get; set; } /// /// If this parameter is specified the Debugger trace listener will be added. /// /// - internal bool DebuggerListener { get; set; } // Debugger + internal bool DebuggerListener { get; set; } /// /// If this parameter is specified the Msh Host trace listener will be added. @@ -95,7 +95,7 @@ internal SwitchParameter PSHostListener { get { return _host; } set { _host = value; } - } // UseHost + } private bool _host = false; #endregion Parameters @@ -428,7 +428,7 @@ internal static void RemoveListenersByName( } } } - } // RemoveAllTraceListenersFromSource + } #endregion RemoveTraceListeners diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs index 2541435d203..277e60861fd 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs @@ -2496,7 +2496,7 @@ e is RemoteException || { _parent._isRunningPromptLoop = false; } - } // end while + } } internal void BlockCommandOutput() @@ -2832,7 +2832,7 @@ private static [TraceSource("ConsoleHostRunspaceInit", "Initialization code for ConsoleHost's Runspace")] private static PSTraceSource s_runspaceInitTracer = PSTraceSource.GetTracer("ConsoleHostRunspaceInit", "Initialization code for ConsoleHost's Runspace", false); - } // ConsoleHost + } /// /// Defines arguments passed to ConsoleHost.CreateRunspace diff --git a/src/Microsoft.PowerShell.ScheduledJob/ScheduledJob.cs b/src/Microsoft.PowerShell.ScheduledJob/ScheduledJob.cs index 5754ed682cf..b93bec6bcd5 100644 --- a/src/Microsoft.PowerShell.ScheduledJob/ScheduledJob.cs +++ b/src/Microsoft.PowerShell.ScheduledJob/ScheduledJob.cs @@ -210,7 +210,7 @@ public override void StartJob() // Add this job to the local repository. ScheduledJobSourceAdapter.AddToRepository(this); - } // lock + } } /// diff --git a/src/Microsoft.PowerShell.Security/security/AclCommands.cs b/src/Microsoft.PowerShell.Security/security/AclCommands.cs index 40cf6aa33da..46a2ea195de 100644 --- a/src/Microsoft.PowerShell.Security/security/AclCommands.cs +++ b/src/Microsoft.PowerShell.Security/security/AclCommands.cs @@ -102,7 +102,7 @@ internal CmdletProviderContext CmdletProviderContext return coreCommandContext; } - } // CmdletProviderContext + } #region brokered properties @@ -881,7 +881,7 @@ protected override void ProcessRecord() } } } - } // class GetAclCommand : PSCmdlet + } /// /// Defines the implementation of the 'set-acl' cmdlet. @@ -1569,7 +1569,7 @@ protected override void ProcessRecord() } } } - } // class SetAclCommand + } #endif // !UNIX }// namespace Microsoft.PowerShell.Commands diff --git a/src/Microsoft.PowerShell.Security/security/CertificateProvider.cs b/src/Microsoft.PowerShell.Security/security/CertificateProvider.cs index 28c9bcfb0e7..fd7c49e3ec6 100644 --- a/src/Microsoft.PowerShell.Security/security/CertificateProvider.cs +++ b/src/Microsoft.PowerShell.Security/security/CertificateProvider.cs @@ -609,7 +609,7 @@ public CertificateProvider() AddItemToCache(string.Empty, s_storeLocations); } } - } // constructor + } /// /// Removes an item at the specified path @@ -955,7 +955,7 @@ protected override Collection InitializeDefaultDrives() drives.Add(drive); return drives; - } // InitializeDefaultDrives + } /// /// Determines if the item at the given path is a store-location @@ -1129,7 +1129,7 @@ protected override bool ItemExists(string path) s_tracer.WriteLine("result = {0}", result); return result; - } // ItemExists + } /// /// Gets the store location, store, or certificate @@ -1353,7 +1353,7 @@ protected override void InvokeDefaultAction(string path) { System.Diagnostics.Process.Start(System.IO.Path.Combine(certPath, certmgr)); } - } // InvokeDefaultAction + } static private string EnsureDriveIsRooted(string path) { @@ -1378,7 +1378,7 @@ static private string EnsureDriveIsRooted(string path) s_tracer.WriteLine("result = {0}", result); return result; - } // EnsureDriveIsRooted + } static private ErrorRecord CreateErrorRecord(string path, CertificateProviderItem itemType) @@ -2068,7 +2068,7 @@ private object GetItemAtPath(string path, bool test, out bool isContainer) } return item; - } // GetItem + } /// /// Gets the child items of a given store, or location. @@ -2128,7 +2128,7 @@ protected override void GetChildNames( { path = NormalizePath(path); GetChildItemsOrNames(path, false, returnContainers, true, GetFilter()); - } // GetChildNames + } /// /// Determines if the item at the specified path is a store @@ -2176,7 +2176,7 @@ protected override bool IsItemContainer(string path) s_tracer.WriteLine("result = {0}", isContainer); return isContainer; - } // IsItemContainer + } /// /// Gets the dynamic parameters for get-item on the Certificate @@ -2789,7 +2789,7 @@ string ICmdletProviderSupportsHelp.GetHelpMaml(string helpItemName, string path) } #endregion - } // CertificateProvider + } /// /// Defines a class to represent a store location in the certificate diff --git a/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs b/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs index becede6497c..efcc71025b5 100644 --- a/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs +++ b/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs @@ -768,4 +768,4 @@ internal static extern int GetInodeData([MarshalAs(UnmanagedType.LPStr)]string p } } } -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/FormatAndOutput/common/BaseFormattingCommand.cs b/src/System.Management.Automation/FormatAndOutput/common/BaseFormattingCommand.cs index f6b9daf5e79..2e455a782a6 100644 --- a/src/System.Management.Automation/FormatAndOutput/common/BaseFormattingCommand.cs +++ b/src/System.Management.Automation/FormatAndOutput/common/BaseFormattingCommand.cs @@ -399,7 +399,7 @@ internal override void EndProcessing() this.WriteObject(endFormat); contextManager.Pop(); } - } // while + } } internal void SetCommandLineParameters(FormattingCommandLineParameters commandLineParameters) diff --git a/src/System.Management.Automation/FormatAndOutput/common/ColumnWidthManager.cs b/src/System.Management.Automation/FormatAndOutput/common/ColumnWidthManager.cs index a059f8c9d3c..87e415f9464 100644 --- a/src/System.Management.Automation/FormatAndOutput/common/ColumnWidthManager.cs +++ b/src/System.Management.Automation/FormatAndOutput/common/ColumnWidthManager.cs @@ -120,7 +120,7 @@ private bool AssignColumnWidths(Span columnWidths) if (availableWidth == 0) break; } - } // while + } return true; // we fit } diff --git a/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader.cs b/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader.cs index 7d10156929c..9ad6cc7f782 100644 --- a/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader.cs +++ b/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader.cs @@ -391,8 +391,8 @@ private void LoadData(XmlDocument doc, TypeInfoDataBase db) { ProcessUnknownNode(n); } - } // foreach - } // using + } + } } else { @@ -1315,7 +1315,7 @@ private void LoadTypeGroups(TypeInfoDataBase db, XmlNode typeGroupsNode) { ProcessUnknownNode(n); } - } // for each + } } //using } @@ -1357,7 +1357,7 @@ private void LoadTypeGroup(TypeInfoDataBase db, XmlNode typeGroupNode, int index // finally add to the list db.typeGroupSection.typeGroupDefinitionList.Add(typeGroupDefinition); - } // using + } } private void LoadTypeGroupTypeRefs(XmlNode typesNode, TypeGroupDefinition typeGroupDefinition) @@ -1376,7 +1376,7 @@ private void LoadTypeGroupTypeRefs(XmlNode typesNode, TypeGroupDefinition typeGr tr.name = GetMandatoryInnerText(n); typeGroupDefinition.typeReferenceList.Add(tr); - } // using + } } else { @@ -1441,7 +1441,7 @@ private AppliesTo LoadAppliesToSection(XmlNode appliesToNode, bool allowSelectio { this.ProcessUnknownNode(n); } - } // using + } } if (appliesTo.referenceList.Count == 0) @@ -2063,7 +2063,7 @@ internal bool ProcessExpressionDirectives(XmlNode containerNode, List u // for further processing by calling context unprocessedNodes.Add(n); } - } // foreach + } if (expressionNodeFound) { diff --git a/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Complex.cs b/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Complex.cs index 70986f79b71..45788280ec2 100644 --- a/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Complex.cs +++ b/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Complex.cs @@ -294,7 +294,7 @@ private bool LoadPropertyBaseHelper(XmlNode propertyBaseNode, PropertyTokenBase if (!IsFilteredOutNode(n)) unprocessedNodes.Add(n); } - } // foreach + } if (expressionNodeFound) { diff --git a/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Table.cs b/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Table.cs index 2fab1b82175..5722ae457d0 100644 --- a/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Table.cs +++ b/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Table.cs @@ -239,9 +239,9 @@ private TableColumnHeaderDefinition LoadColumnHeaderDefinition(XmlNode columnHea { this.ProcessUnknownNode(n); } - } // foreach + } return chd; - } // using + } } private bool ReadPositiveIntegerValue(XmlNode n, out int val) @@ -483,7 +483,7 @@ private TableRowItemDefinition LoadColumnEntry(XmlNode columnEntryNode, int inde } return rid; - } // using + } } } } diff --git a/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Views.cs b/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Views.cs index 8313adabdd8..cde33e4a85a 100644 --- a/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Views.cs +++ b/src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/typeDataXmlLoader_Views.cs @@ -121,7 +121,7 @@ private ViewDefinition LoadView(XmlNode viewNode, int index) { secondPassUnprocessedNodes.Add(n); } - } // foreach + } if (view.mainControl == null) { @@ -263,7 +263,7 @@ private bool LoadCommonViewData(XmlNode viewNode, ViewDefinition view, List diff --git a/src/System.Management.Automation/engine/AliasInfo.cs b/src/System.Management.Automation/engine/AliasInfo.cs index 4b18ac4f74f..45065c3de1b 100644 --- a/src/System.Management.Automation/engine/AliasInfo.cs +++ b/src/System.Management.Automation/engine/AliasInfo.cs @@ -117,7 +117,7 @@ public CommandInfo ReferencedCommand return referencedCommand; } - } // ReferencedCommand + } /// /// Gets the command information for the command that @@ -223,7 +223,7 @@ internal void SetDefinition(string definition, bool force) } _definition = definition; - } // SetDefinition + } /// /// Gets or sets the scope options for the alias @@ -354,5 +354,5 @@ public override ReadOnlyCollection OutputType return null; } } - } // AliasInfo -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/ApplicationInfo.cs b/src/System.Management.Automation/engine/ApplicationInfo.cs index f635aa794f1..ad0f0b2ecb8 100644 --- a/src/System.Management.Automation/engine/ApplicationInfo.cs +++ b/src/System.Management.Automation/engine/ApplicationInfo.cs @@ -50,7 +50,7 @@ internal ApplicationInfo(string name, string path, ExecutionContext context) : b Path = path; Extension = System.IO.Path.GetExtension(path); _context = context; - } // ApplicationInfo ctor + } private ExecutionContext _context; #endregion ctor @@ -131,5 +131,5 @@ public override ReadOnlyCollection OutputType } } private ReadOnlyCollection _outputType = null; - } // ApplicationInfo -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/AutomationNull.cs b/src/System.Management.Automation/engine/AutomationNull.cs index 0d3c432ef21..e74258bf354 100644 --- a/src/System.Management.Automation/engine/AutomationNull.cs +++ b/src/System.Management.Automation/engine/AutomationNull.cs @@ -30,5 +30,5 @@ public static class AutomationNull #endregion public_property } -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/engine/ChildrenCmdletProviderInterfaces.cs b/src/System.Management.Automation/engine/ChildrenCmdletProviderInterfaces.cs index 0e9be192c25..38f6eb2b443 100644 --- a/src/System.Management.Automation/engine/ChildrenCmdletProviderInterfaces.cs +++ b/src/System.Management.Automation/engine/ChildrenCmdletProviderInterfaces.cs @@ -22,7 +22,7 @@ private ChildItemCmdletProviderIntrinsics() Dbg.Diagnostics.Assert( false, "This constructor should never be called. Only the constructor that takes an instance of SessionState should be called."); - } // CmdletProviderIntrinsics private + } /// /// Constructs a facade over the "real" session state API @@ -39,7 +39,7 @@ internal ChildItemCmdletProviderIntrinsics(Cmdlet cmdlet) _cmdlet = cmdlet; _sessionState = cmdlet.Context.EngineSessionState; - } // ChildItemCmdletProviderIntrinsics internal + } /// /// Constructs a facade over the "real" session state API @@ -58,7 +58,7 @@ internal ChildItemCmdletProviderIntrinsics(SessionStateInternal sessionState) } _sessionState = sessionState; - } // ChildItemCmdletProviderIntrinsics internal + } #endregion Constructors #region Public methods @@ -110,7 +110,7 @@ public Collection Get(string path, bool recurse) // Parameter validation is done in the session state object return _sessionState.GetChildItems(new string[] { path }, recurse, uint.MaxValue, false, false); - } // GetChildItems + } /// /// Gets the child items of the container at the given path(s). @@ -275,7 +275,7 @@ internal void Get( // Parameter validation is done in the session state object _sessionState.GetChildItems(path, recurse, depth, context); - } // GetChildItems + } /// /// Gets the dynamic parameters for the get-childitem cmdlet. @@ -324,7 +324,7 @@ internal object GetChildItemsDynamicParameters( // Parameter validation is done in the session state object return _sessionState.GetChildItemsDynamicParameters(path, recurse, context); - } // GetChildItemsDynamicParameters + } #endregion GetChildItems @@ -383,7 +383,7 @@ public Collection GetNames( // Parameter validation is done in the session state object return _sessionState.GetChildNames(new string[] { path }, returnContainers, recurse, uint.MaxValue, false, false); - } // GetChildNames + } /// /// Gets the child names of the container at the given path. @@ -571,7 +571,7 @@ internal void GetNames( // Parameter validation is done in the session state object _sessionState.GetChildNames(path, returnContainers, recurse, depth, context); - } // GetChildNames + } /// /// Gets the dynamic parameters for the get-childitem -name cmdlet. @@ -614,7 +614,7 @@ internal object GetChildNamesDynamicParameters( // Parameter validation is done in the session state object return _sessionState.GetChildNamesDynamicParameters(path, context); - } // GetChildNamesDynamicParameters + } #endregion GetChildNames @@ -659,7 +659,7 @@ public bool HasChild(string path) // Parameter validation is done in the session state object return _sessionState.HasChildItems(path, false, false); - } // HasChildItems + } /// /// Determines if an item at the given path has children. @@ -752,7 +752,7 @@ internal bool HasChild( // Parameter validation is done in the session state object return _sessionState.HasChildItems(path, context); - } // HasChildItems + } #endregion HasChildItems @@ -764,7 +764,7 @@ internal bool HasChild( private SessionStateInternal _sessionState; #endregion private data - } // ChildItemCmdletProviderIntrinsics + } /// /// This enum determines which types of containers are returned from some of diff --git a/src/System.Management.Automation/engine/CmdletFamilyProviderInterfaces.cs b/src/System.Management.Automation/engine/CmdletFamilyProviderInterfaces.cs index 524323bada1..ac103d6d8ef 100644 --- a/src/System.Management.Automation/engine/CmdletFamilyProviderInterfaces.cs +++ b/src/System.Management.Automation/engine/CmdletFamilyProviderInterfaces.cs @@ -22,7 +22,7 @@ private ProviderIntrinsics() Dbg.Diagnostics.Assert( false, "This constructor should never be called. Only the constructor that takes an instance of SessionState should be called."); - } // ProviderIntrinsics private + } /// /// Constructs a facade over the "real" session state API @@ -46,7 +46,7 @@ internal ProviderIntrinsics(Cmdlet cmdlet) Content = new ContentCmdletProviderIntrinsics(cmdlet); Property = new PropertyCmdletProviderIntrinsics(cmdlet); SecurityDescriptor = new SecurityDescriptorCmdletProviderIntrinsics(cmdlet); - } // ProviderIntrinsics internal + } /// /// Constructs a facade over the "real" session state API @@ -66,7 +66,7 @@ internal ProviderIntrinsics(SessionStateInternal sessionState) Content = new ContentCmdletProviderIntrinsics(sessionState); Property = new PropertyCmdletProviderIntrinsics(sessionState); SecurityDescriptor = new SecurityDescriptorCmdletProviderIntrinsics(sessionState); - } // ProviderIntrinsics internal + } #endregion Constructors @@ -104,6 +104,6 @@ internal ProviderIntrinsics(SessionStateInternal sessionState) private InternalCommand _cmdlet; #endregion private data - } // ProviderIntrinsics + } } diff --git a/src/System.Management.Automation/engine/CmdletInfo.cs b/src/System.Management.Automation/engine/CmdletInfo.cs index cae7d0b9f58..88f007dab1a 100644 --- a/src/System.Management.Automation/engine/CmdletInfo.cs +++ b/src/System.Management.Automation/engine/CmdletInfo.cs @@ -147,7 +147,7 @@ public string Verb { return _verb; } - } // Verb + } private string _verb = String.Empty; /// @@ -159,7 +159,7 @@ public string Noun { return _noun; } - } // Noun + } private string _noun = String.Empty; internal static bool SplitCmdletName(string name, out string verb, out string noun) @@ -199,7 +199,7 @@ internal set { _helpFilePath = value; } - } // HelpFile + } private string _helpFilePath = String.Empty; internal override HelpCategory HelpCategory @@ -543,5 +543,5 @@ internal override bool ImplementsDynamicParameters } #endregion internal/private members - } // CmdletInfo -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/CmdletParameterBinderController.cs b/src/System.Management.Automation/engine/CmdletParameterBinderController.cs index 330dfe3383a..eefa6cfc8f4 100644 --- a/src/System.Management.Automation/engine/CmdletParameterBinderController.cs +++ b/src/System.Management.Automation/engine/CmdletParameterBinderController.cs @@ -1183,7 +1183,7 @@ private Collection BindParameters(uint parameterSets, } } return result; - } // BindParameters + } /// /// Determines if a ScriptBlock can be bound directly to the type of the specified parameter @@ -1666,7 +1666,7 @@ private void HandleRemainingArguments() } } } - } // HandleRemainingArguments + } /// /// Determines if the cmdlet supports dynamic parameters. If it does, @@ -1815,10 +1815,10 @@ private void HandleCommandLineDynamicParameters(out ParameterBindingException ou out outgoingBindingException); } } - } // dynamicParameterCmdlet != null + } } } - } // HandleCommandLineDynamicParameters + } /// /// This method determines if the unbound mandatory parameters take pipeline input or @@ -2717,7 +2717,7 @@ private int ValidateParameterSets(bool prePipelineInput, bool setDefault) } return validParameterSetCount; - } // ValidateParameterSets + } private int ResolveParameterSetAmbiguityBasedOnMandatoryParameters() { @@ -2843,7 +2843,7 @@ private bool AtLeastOneUnboundValidParameterSetTakesPipelineInput(uint validPara } return result; - } // AtLeastOneValidParameterSetTakesPipelineInput + } /// /// Checks for unbound mandatory parameters. If any are found, an exception is thrown. @@ -2975,7 +2975,7 @@ internal bool HandleUnboundMandatoryParameters( } return result; - } // HandleUnboundMandatoryParameters + } private Dictionary PromptForMissingMandatoryParameters( Collection fieldDescriptionList, @@ -3116,7 +3116,7 @@ private Collection CreatePromptDataStructures( fDesc.IsMandatory = true; fieldDescriptionList.Add(fDesc); - } // foreach unbound parameter + } return fieldDescriptionList; } @@ -3829,7 +3829,7 @@ private bool InvokeAndBindDelayBindScriptBlock(PSObject inputToOperateOn, out bo } return result; - } // InvokeAndBindDelayBindScriptBlock + } /// /// Determines the number of valid parameter sets based on the valid parameter diff --git a/src/System.Management.Automation/engine/CommandBase.cs b/src/System.Management.Automation/engine/CommandBase.cs index 433ca142e8d..2bb168d6a68 100644 --- a/src/System.Management.Automation/engine/CommandBase.cs +++ b/src/System.Management.Automation/engine/CommandBase.cs @@ -279,7 +279,7 @@ public enum ActionPreference Ignore, /// Suspend the command for further diagnosis. Supported only for workflows. Suspend, - } // enum ActionPreference + } #endregion ActionPreference #region ConfirmImpact @@ -315,7 +315,7 @@ public enum ConfirmImpact /// confirmed by default unless otherwise specified. /// High, - } // enum ConfirmImpact + } #endregion ConfirmImpact /// @@ -372,7 +372,7 @@ public SessionState SessionState return this.InternalState; } } - } // SessionState + } /// /// Gets the event manager for the current runspace. @@ -386,7 +386,7 @@ public PSEventManager Events return this.Context.Events; } } - } // Events + } /// /// Repository for jobs @@ -439,7 +439,7 @@ public ProviderIntrinsics InvokeProvider return _invokeProvider ?? (_invokeProvider = new ProviderIntrinsics(this)); } } - } // InvokeProvider + } #region Provider wrappers @@ -466,7 +466,7 @@ public string GetUnresolvedProviderPathFromPSPath(string path) { return SessionState.Path.GetUnresolvedProviderPathFromPSPath(path); } - } // GetUnresolvedProviderPathFromPSPath + } /// public Collection GetResolvedProviderPathFromPSPath(string path, out ProviderInfo provider) @@ -475,7 +475,7 @@ public Collection GetResolvedProviderPathFromPSPath(string path, out Pro { return SessionState.Path.GetResolvedProviderPathFromPSPath(path, out provider); } - } // GetResolvedProviderPathFromPSPath + } #endregion Provider wrappers #endregion internal_members @@ -506,7 +506,7 @@ public object GetVariableValue(string name) { return this.SessionState.PSVariable.GetValue(name); } - } // GetVariableValue + } /// @@ -516,7 +516,7 @@ public object GetVariableValue(string name, object defaultValue) { return this.SessionState.PSVariable.GetValue(name, defaultValue); } - } // GetVariableValue + } #endregion PSVariable APIs @@ -525,6 +525,6 @@ public object GetVariableValue(string name, object defaultValue) #endregion Parameter methods #endregion public_methods - } // PSCmdlet + } } diff --git a/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs b/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs index d3ef4128bd5..e6b7e4c3e96 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs @@ -4383,9 +4383,9 @@ internal static IEnumerable CompleteFilename(CompletionContext // We can get here when get-item fails, perhaps due an acl or whatever. results.Add(new CompletionResult(completionText)); } - } // End of not filesystem case - } // End of foreach - } // End of 'if (psobjs != null)' + } + } + } } return results; diff --git a/src/System.Management.Automation/engine/CommandDiscovery.cs b/src/System.Management.Automation/engine/CommandDiscovery.cs index 75a0bdd495d..8b372643320 100644 --- a/src/System.Management.Automation/engine/CommandDiscovery.cs +++ b/src/System.Management.Automation/engine/CommandDiscovery.cs @@ -654,7 +654,7 @@ internal CommandProcessorBase LookupCommandProcessor(CommandInfo commandInfo, processor.Command.MyInvocation.InvocationName = commandInfo.Name; return processor; - } // LookupCommandProcessor + } internal static void ShouldRun(ExecutionContext context, PSHost host, CommandInfo commandInfo, CommandOrigin commandOrigin) { @@ -1332,7 +1332,7 @@ internal IEnumerable GetCommandPathSearcher(IEnumerable patterns // Construct the CommandPathSearch object and return it. return new CommandPathSearch(patterns, lookupPathArray, Context); - } // GetCommandPathSearcher + } /// /// Gets the resolved paths contained in the PATH environment @@ -1388,7 +1388,7 @@ internal IEnumerable GetLookupDirectoryPaths() // Cache the new lookup paths return _cachedLookupPaths ?? (_cachedLookupPaths = result); - } // GetLookupDirectoryPaths + } /// /// The cached list of lookup paths. It can be invalidated by @@ -1426,8 +1426,8 @@ internal static string[] PathExtensionsWithPs1Prepended } return s_cachedPathExtCollectionWithPs1; - } // get - } // PathExtensions + } + } /// /// Gets the PATHEXT environment variable extensions and tokenizes them. @@ -1445,8 +1445,8 @@ internal static string[] PathExtensions } return s_cachedPathExtCollection; - } // get - } // PathExtensions + } + } private static void InitPathExtCache(string pathExt) { @@ -1553,7 +1553,7 @@ internal IEnumerator GetCmdletInfo(string cmdletName, bool searchAll } } } - } // GetCmdletInfo + } /// /// Removes a cmdlet from the cmdlet cache. @@ -1748,7 +1748,7 @@ internal Collection IndexOfRelativePath() } } return result; - } // IndexOfRelativePath + } /// /// Finds the first index of the specified string. The string @@ -1782,7 +1782,7 @@ internal Collection IndexOfRelativePath() } return result; } - } // LookupPathCollection + } // Guid is {ea9e8155-5042-5537-0b73-8c0e6b53f398} [EventSource(Name = "Microsoft-PowerShell-CommandDiscovery")] diff --git a/src/System.Management.Automation/engine/CommandInfo.cs b/src/System.Management.Automation/engine/CommandInfo.cs index 72172708514..19803efa878 100644 --- a/src/System.Management.Automation/engine/CommandInfo.cs +++ b/src/System.Management.Automation/engine/CommandInfo.cs @@ -122,7 +122,7 @@ internal CommandInfo(string name, CommandTypes type) Name = name; CommandType = type; - } // CommandInfo ctor + } /// /// Creates an instance of the CommandInfo class with the specified name and type @@ -143,7 +143,7 @@ internal CommandInfo(string name, CommandTypes type, ExecutionContext context) : this(name, type) { this.Context = context; - } // CommandInfo ctor + } /// /// This is a copy constructor, used primarily for get-command. @@ -616,7 +616,7 @@ public ReadOnlyCollection ParameterSets } return _parameterSets; } - } // ParameterSets + } internal ReadOnlyCollection _parameterSets; /// @@ -741,8 +741,8 @@ internal static Collection GetParameterMetadata(Command } return result; - } // GetParameterMetadata - } // CommandInfo + } + } /// /// Represents , but can be used where a real type @@ -985,4 +985,4 @@ internal interface IScriptCommandInfo { ScriptBlock ScriptBlock { get; } } -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/engine/CommandMetadata.cs b/src/System.Management.Automation/engine/CommandMetadata.cs index b79cdf99500..d496d51a02b 100644 --- a/src/System.Management.Automation/engine/CommandMetadata.cs +++ b/src/System.Management.Automation/engine/CommandMetadata.cs @@ -337,7 +337,7 @@ internal static CommandMetadata Get(string commandName, Type cmdletType, Executi } return result; - } // Get + } /// /// Constructs an instance of CommandMetadata using reflection against a bindable object @@ -696,7 +696,7 @@ private void ConstructCmdletMetadataUsingReflection() _otherAttributes.Add(attribute); } } - } // ConstructCmdletMetadataUsingReflection + } /// /// Extracts the cmdlet data from the CmdletAttribute @@ -744,7 +744,7 @@ private void ProcessCmdletAttribute(CmdletCommonMetadataAttribute attribute) { PositionalBinding = cmdletBindingAttribute.PositionalBinding; } - } // ProcessCmdletAttribute + } /// /// Merges parameter metadata from different sources: those that are coming from Type, @@ -815,7 +815,7 @@ private MergedCommandParameterMetadata MergeParameterMetadata(ExecutionContext c } return staticCommandParameterMetadata; - } // MergeParameterMetadata + } #endregion helper methods diff --git a/src/System.Management.Automation/engine/CommandPathSearch.cs b/src/System.Management.Automation/engine/CommandPathSearch.cs index c82b6f34746..a9cb076ae56 100644 --- a/src/System.Management.Automation/engine/CommandPathSearch.cs +++ b/src/System.Management.Automation/engine/CommandPathSearch.cs @@ -223,7 +223,7 @@ private void ResolveCurrentDirectoryInLookupPaths() int indexToRemove = indexesToRemove[removeIndex - 1]; _lookupPaths.RemoveAt(indexToRemove); } - } // ResolveCurrentDirectoryInLookupPaths + } /// /// Gets an instance of a command enumerator @@ -234,7 +234,7 @@ private void ResolveCurrentDirectoryInLookupPaths() IEnumerator IEnumerable.GetEnumerator() { return this; - } // GetEnumerator + } /// /// Gets an instance of a command enumerator @@ -245,7 +245,7 @@ IEnumerator IEnumerable.GetEnumerator() IEnumerator IEnumerable.GetEnumerator() { return this; - } // GetEnumerator + } /// /// Moves the enumerator to the next command match @@ -337,7 +337,7 @@ public bool MoveNext() } while (true); return result; - } // MoveNext + } /// /// Resets the enumerator to before the first command match @@ -349,7 +349,7 @@ public void Reset() _currentDirectoryResults = Utils.EmptyArray(); _currentDirectoryResultsEnumerator = _currentDirectoryResults.GetEnumerator(); _justReset = true; - } // Reset + } /// /// Gets the path to the current command match. @@ -370,7 +370,7 @@ string IEnumerator.Current return _currentDirectoryResultsEnumerator.Current; } - } // Current + } object IEnumerator.Current { @@ -449,7 +449,7 @@ private void GetNewDirectoryResults(string pattern, string directory) _currentDirectoryResults = result ?? Utils.EmptyArray(); _currentDirectoryResultsEnumerator = _currentDirectoryResults.GetEnumerator(); - } // GetMatchingPathsInDirectory + } private IEnumerable CheckAgainstAcceptableCommandNames(string[] fileNames) { @@ -559,6 +559,6 @@ private IEnumerable JustCheckExtensions(string[] fileNames) private Collection _acceptableCommandNames; #endregion private members - } // CommandSearch + } } diff --git a/src/System.Management.Automation/engine/CommandProcessor.cs b/src/System.Management.Automation/engine/CommandProcessor.cs index 1404cf5ea9f..1b435ccbd60 100644 --- a/src/System.Management.Automation/engine/CommandProcessor.cs +++ b/src/System.Management.Automation/engine/CommandProcessor.cs @@ -624,7 +624,7 @@ private void WriteInputObjectError( errorRecord.SetInvocationInfo(this.Command.MyInvocation); this.commandRuntime._WriteErrorSkipAllowCheck(errorRecord); - } // WriteIgnoredInputObjectError + } /// /// Reads an object from an input pipeline and attempts to bind the parameters diff --git a/src/System.Management.Automation/engine/CommandProcessorBase.cs b/src/System.Management.Automation/engine/CommandProcessorBase.cs index 859fc6ca1bd..bc336cb74be 100644 --- a/src/System.Management.Automation/engine/CommandProcessorBase.cs +++ b/src/System.Management.Automation/engine/CommandProcessorBase.cs @@ -383,7 +383,7 @@ internal void AddParameter(CommandParameterInternal parameter) { Diagnostics.Assert(parameter != null, "Caller to verify parameter argument"); arguments.Add(parameter); - } // AddParameter + } /// /// Prepares the command for execution. @@ -586,7 +586,7 @@ internal virtual void Complete() // wrap it and bubble it up. throw ManageInvocationException(e); } - } // Complete + } /// /// Calls the virtual Complete method after setting the appropriate session state scope. diff --git a/src/System.Management.Automation/engine/CommandSearcher.cs b/src/System.Management.Automation/engine/CommandSearcher.cs index 02eb8e8fe57..698b371571c 100644 --- a/src/System.Management.Automation/engine/CommandSearcher.cs +++ b/src/System.Management.Automation/engine/CommandSearcher.cs @@ -64,12 +64,12 @@ internal CommandSearcher( IEnumerator IEnumerable.GetEnumerator() { return this; - } // GetEnumerator + } IEnumerator IEnumerable.GetEnumerator() { return this; - } // GetEnumerator + } /// /// Moves the enumerator to the next command match. Public for IEnumerable @@ -198,7 +198,7 @@ public bool MoveNext() _currentState = SearchState.QualifiedFileSystemPath; return true; } - } // SearchState.Reset + } if (_currentState == SearchState.PowerShellPathResolution) { @@ -210,7 +210,7 @@ public bool MoveNext() { return true; } - } // SearchState.PowerShellPathResolution + } // Search using CommandPathSearch @@ -223,7 +223,7 @@ public bool MoveNext() { return true; } - } // SearchState.QualifiedFileSystemPath || SearchState.PathSearch + } if (_currentState == SearchState.PathSearch) { @@ -238,7 +238,7 @@ public bool MoveNext() } return false; - } // MoveNext + } private CommandInfo SearchForAliases() { @@ -405,7 +405,7 @@ CommandInfo IEnumerator.Current return _currentMatch; } - } // Current + } object IEnumerator.Current { @@ -629,7 +629,7 @@ private CommandInfo GetInfoFromPath(string path) } return result; - } // GetNextFromPath + } /// /// Gets the next matching alias @@ -707,7 +707,7 @@ private CommandInfo GetNextAlias() result.Definition); } return result; - } // GetNextAlias + } /// /// Gets the next matching function @@ -920,7 +920,7 @@ private CommandInfo GetFunction(string function) result = GetFunctionFromModules(function); } return result; - } // GetFunction + } /// /// Gets the next cmdlet from the collection of matching cmdlets. @@ -1038,7 +1038,7 @@ private string DoPowerShellRelativePathLookup() } } return result; - } // DoPowerShellRelativePathLookup + } /// /// Resolves the given path as an PSPath and ensures that it was resolved @@ -1141,7 +1141,7 @@ private string ResolvePSPath(string path) } return result; - } // ResolvePSPath + } /// /// Creates a collection of patterns used to find the command @@ -1213,7 +1213,7 @@ internal Collection ConstructSearchPatternsFromName(string name, bool co result.Add(name); } return result; - } // ConstructSearchPatternsFromName + } /// /// Determines if the given command name is a qualified PowerShell path. @@ -1238,7 +1238,7 @@ private static bool IsQualifiedPSPath(string commandName) LocationGlobber.IsProviderDirectPath(commandName); return result; - } // IsQualifiedPSPath + } private enum CanDoPathLookupResult { @@ -1309,7 +1309,7 @@ private static CanDoPathLookupResult CanDoPathLookup(string possiblePath) } while (false); return result; - } // CanDoPathLookup + } /// /// The command name to search for @@ -1480,7 +1480,7 @@ public void Reset() _currentState = SearchState.SearchingAliases; _matchingAlias = null; _matchingCmdlet = null; - } // Reset + } internal CommandOrigin CommandOrigin { @@ -1546,10 +1546,10 @@ private enum SearchState // No more matches can be found NoMoreMatches, - } // SearchState + } #endregion private members - } // CommandSearcher + } /// /// Determines which types of commands should be globbed using the specified diff --git a/src/System.Management.Automation/engine/CommonCommandParameters.cs b/src/System.Management.Automation/engine/CommonCommandParameters.cs index 2c7ed0d6278..43585e78b31 100644 --- a/src/System.Management.Automation/engine/CommonCommandParameters.cs +++ b/src/System.Management.Automation/engine/CommonCommandParameters.cs @@ -31,7 +31,7 @@ internal CommonParameters(MshCommandRuntime commandRuntime) throw PSTraceSource.NewArgumentNullException("commandRuntime"); } _commandRuntime = commandRuntime; - } // ctor + } #endregion ctor @@ -240,6 +240,6 @@ protected override void Validate(object arguments, EngineIntrinsics engineIntrin } } } - } // class UserFeedbackParameters + } } diff --git a/src/System.Management.Automation/engine/CompiledCommandParameter.cs b/src/System.Management.Automation/engine/CompiledCommandParameter.cs index e653e368a21..ba7f739611e 100644 --- a/src/System.Management.Automation/engine/CompiledCommandParameter.cs +++ b/src/System.Management.Automation/engine/CompiledCommandParameter.cs @@ -563,7 +563,7 @@ public override string ToString() } #endregion helper methods - } // CompiledCommandParameter + } /// /// The types of collections that are supported as parameter types. diff --git a/src/System.Management.Automation/engine/ContentCmdletProviderInterfaces.cs b/src/System.Management.Automation/engine/ContentCmdletProviderInterfaces.cs index 10adef8cd4e..29900a754a6 100644 --- a/src/System.Management.Automation/engine/ContentCmdletProviderInterfaces.cs +++ b/src/System.Management.Automation/engine/ContentCmdletProviderInterfaces.cs @@ -23,7 +23,7 @@ private ContentCmdletProviderIntrinsics() Dbg.Diagnostics.Assert( false, "This constructor should never be called. Only the constructor that takes an instance of SessionState should be called."); - } // CmdletProviderIntrinsics private + } /// /// Constructs a facade over the "real" session state API @@ -43,7 +43,7 @@ internal ContentCmdletProviderIntrinsics(Cmdlet cmdlet) _cmdlet = cmdlet; _sessionState = cmdlet.Context.EngineSessionState; - } // ContentCmdletProviderIntrinsics internal + } /// /// Constructs a facade over the "real" session state API @@ -62,7 +62,7 @@ internal ContentCmdletProviderIntrinsics(SessionStateInternal sessionState) } _sessionState = sessionState; - } // ContentCmdletProviderIntrinsics internal + } #endregion Constructors @@ -108,7 +108,7 @@ public Collection GetReader(string path) // Parameter validation is done in the session state object return _sessionState.GetContentReader(new string[] { path }, false, false); - } // GetContentReader + } /// /// Gets the content reader for the item at the specified path @@ -195,7 +195,7 @@ internal Collection GetReader( // Parameter validation is done in the session state object return _sessionState.GetContentReader(new string[] { path }, context); - } // GetContentReader + } /// /// Gets the dynamic parameters for the get-content cmdlet. @@ -238,7 +238,7 @@ internal object GetContentReaderDynamicParameters( // Parameter validation is done in the session state object return _sessionState.GetContentReaderDynamicParameters(path, context); - } // GetContentReaderDynamicParameters + } #endregion GetContentReader @@ -282,7 +282,7 @@ public Collection GetWriter(string path) // Parameter validation is done in the session state object return _sessionState.GetContentWriter(new string[] { path }, false, false); - } // GetContentWriter + } /// /// Gets the content writer for the item(s) at the specified path. @@ -328,7 +328,7 @@ public Collection GetWriter(string[] path, bool force, bool lite // Parameter validation is done in the session state object return _sessionState.GetContentWriter(path, force, literalPath); - } // GetContentWriter + } /// /// @@ -369,7 +369,7 @@ internal Collection GetWriter( // Parameter validation is done in the session state object return _sessionState.GetContentWriter(new string[] { path }, context); - } // GetContentWriter + } /// /// Gets the dynamic parameters for the set-content and add-content cmdlet. @@ -412,7 +412,7 @@ internal object GetContentWriterDynamicParameters( // Parameter validation is done in the session state object return _sessionState.GetContentWriterDynamicParameters(path, context); - } // GetContentWriterDynamicParameters + } #endregion GetContentWriter @@ -453,7 +453,7 @@ public void Clear(string path) // Parameter validation is done in the session state object _sessionState.ClearContent(new string[] { path }, false, false); - } // ClearContent + } /// /// Clears the content from the item(s) specified by the path @@ -536,7 +536,7 @@ internal void Clear(string path, CmdletProviderContext context) // Parameter validation is done in the session state object _sessionState.ClearContent(new string[] { path }, context); - } // ClearContent + } /// /// Gets the dynamic parameters for the clear-content cmdlet. @@ -577,7 +577,7 @@ internal object ClearContentDynamicParameters(string path, CmdletProviderContext // Parameter validation is done in the session state object return _sessionState.ClearContentDynamicParameters(path, context); - } // ClearContentDynamicParameters + } #endregion ClearContent @@ -589,6 +589,6 @@ internal object ClearContentDynamicParameters(string path, CmdletProviderContext private SessionStateInternal _sessionState; #endregion private data - } // ContentCmdletProviderIntrinsics + } } diff --git a/src/System.Management.Automation/engine/CoreAdapter.cs b/src/System.Management.Automation/engine/CoreAdapter.cs index 5dbc2e60127..50fb8c59158 100644 --- a/src/System.Management.Automation/engine/CoreAdapter.cs +++ b/src/System.Management.Automation/engine/CoreAdapter.cs @@ -1452,13 +1452,13 @@ private static MethodInformation FindBestMethodImpl( candidate = null; } } - } // parameter loop + } if (candidate != null) { candidates.Add(candidate); } - } // method loop + } if (candidates.Count == 0) { diff --git a/src/System.Management.Automation/engine/DataStoreAdapter.cs b/src/System.Management.Automation/engine/DataStoreAdapter.cs index 490a4d1335a..7fbb690f27e 100644 --- a/src/System.Management.Automation/engine/DataStoreAdapter.cs +++ b/src/System.Management.Automation/engine/DataStoreAdapter.cs @@ -46,7 +46,7 @@ public string CurrentLocation { _currentWorkingDirectory = value; } - } // CurrentLocation + } /// /// The current working directory for the virtual drive @@ -136,7 +136,7 @@ internal void SetRoot(string path) } _root = path; - } // SetRoot + } /// /// The root of the virtual drive @@ -479,7 +479,7 @@ internal bool Hidden set { _hidden = value; - } // set + } } // Hidden /// @@ -510,7 +510,7 @@ internal void SetName(string newName) } _name = newName; - } // SetName + } /// /// Sets the provider of the drive to a new provider. @@ -536,7 +536,7 @@ internal void SetProvider(ProviderInfo newProvider) } _provider = newProvider; - } // SetProvider + } /// /// Traces the virtual drive @@ -760,7 +760,7 @@ public bool Equals(PSDriveInfo drive) return drive1.CompareTo(drive2) < 0; } } - } // operator < + } /// /// Compares the specified drives to determine if drive1 is greater than @@ -800,7 +800,7 @@ public bool Equals(PSDriveInfo drive) return drive1.CompareTo(drive2) > 0; } } - } // operator > + } /// /// Gets the hash code for this instance. diff --git a/src/System.Management.Automation/engine/DataStoreAdapterProvider.cs b/src/System.Management.Automation/engine/DataStoreAdapterProvider.cs index 63095a4a3e9..95f4a531db1 100644 --- a/src/System.Management.Automation/engine/DataStoreAdapterProvider.cs +++ b/src/System.Management.Automation/engine/DataStoreAdapterProvider.cs @@ -170,8 +170,8 @@ public Provider.ProviderCapabilities Capabilities } } return _capabilities; - } // get - } // Capabilities + } + } private ProviderCapabilities _capabilities = ProviderCapabilities.None; private bool _capabilitiesRead; @@ -182,7 +182,7 @@ public Provider.ProviderCapabilities Capabilities /// The location can be either a fully qualified provider path /// or an Msh path. This is the location that is substituted for the ~. /// - public string Home { get; set; } // Home + public string Home { get; set; } /// /// Gets an enumeration of drives that are available for @@ -193,8 +193,8 @@ public Collection Drives get { return _sessionState.Drive.GetAllForProvider(FullName); - } // get - } // Drives + } + } /// /// A hidden drive for the provider that is used for setting @@ -211,8 +211,8 @@ internal PSDriveInfo HiddenDrive get { return _hiddenDrive; - } // get - } // HiddenDrive + } + } /// /// Gets the string representation of the instance which is the name of the provider. @@ -641,6 +641,6 @@ internal PSNoteProperty GetNotePropertyForProviderCmdlets(string name) } return _noteProperty; } - } // class ProviderInfo -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/DriveInterfaces.cs b/src/System.Management.Automation/engine/DriveInterfaces.cs index 51193648128..47dec0a6e5c 100644 --- a/src/System.Management.Automation/engine/DriveInterfaces.cs +++ b/src/System.Management.Automation/engine/DriveInterfaces.cs @@ -22,7 +22,7 @@ private DriveManagementIntrinsics() Dbg.Diagnostics.Assert( false, "This constructor should never be called. Only the constructor that takes an instance of SessionState should be called."); - } // DriveManagementIntrinsics private + } /// /// Constructs a Drive management facade @@ -41,7 +41,7 @@ internal DriveManagementIntrinsics(SessionStateInternal sessionState) } _sessionState = sessionState; - } // DriveManagementIntrinsics internal + } #endregion Constructors @@ -63,8 +63,8 @@ public PSDriveInfo Current "The only constructor for this class should always set the sessionState field"); return _sessionState.CurrentDrive; - } // get - } // Current + } + } #region New @@ -109,7 +109,7 @@ public PSDriveInfo New(PSDriveInfo drive, string scope) // Parameter validation is done in the session state object return _sessionState.NewDrive(drive, scope); - } // New + } /// /// Creates a new MSH drive in session state @@ -158,7 +158,7 @@ internal void New( // Parameter validation is done in the session state object _sessionState.NewDrive(drive, scope, context); - } // New + } /// /// Gets an object that defines the additional parameters for the NewDrive implementation @@ -191,7 +191,7 @@ internal object NewDriveDynamicParameters( // Parameter validation is done in the session state object return _sessionState.NewDriveDynamicParameters(providerId, context); - } // NewDriveDynamicParameters + } #endregion New @@ -221,7 +221,7 @@ public void Remove(string driveName, bool force, string scope) // Parameter validation is done in the session state object _sessionState.RemoveDrive(driveName, force, scope); - } // Remove + } /// /// Removes the specified drive. @@ -254,7 +254,7 @@ internal void Remove( // Parameter validation is done in the session state object _sessionState.RemoveDrive(driveName, force, scope, context); - } // RemoveDrive + } #endregion Remove @@ -284,7 +284,7 @@ public PSDriveInfo Get(string driveName) // Parameter validation is done in the session state object return _sessionState.GetDrive(driveName); - } // GetDrive + } /// /// Gets the drive information for the drive specified by name. @@ -321,7 +321,7 @@ public PSDriveInfo GetAtScope(string driveName, string scope) // Parameter validation is done in the session state object return _sessionState.GetDrive(driveName, scope); - } // GetAtScope + } /// /// Retrieves all the drives in the specified scope @@ -333,7 +333,7 @@ public Collection GetAll() "The only constructor for this class should always set the sessionState field"); return _sessionState.Drives(null); - } // GetAll + } /// /// Retrieves all the drives in the specified scope @@ -357,7 +357,7 @@ public Collection GetAllAtScope(string scope) "The only constructor for this class should always set the sessionState field"); return _sessionState.Drives(scope); - } // GetAllAtScope + } /// /// Gets all the drives for the specified provider @@ -377,7 +377,7 @@ public Collection GetAllForProvider(string providerName) // Parameter validation is done in the session state object return _sessionState.GetDrivesForProvider(providerName); - } // GetAllForProvider + } #endregion GetDrive @@ -389,6 +389,6 @@ public Collection GetAllForProvider(string providerName) private SessionStateInternal _sessionState; #endregion private data - } // DriveIntrinsics + } } diff --git a/src/System.Management.Automation/engine/EngineIntrinsics.cs b/src/System.Management.Automation/engine/EngineIntrinsics.cs index a33b384e243..de06c3a5249 100644 --- a/src/System.Management.Automation/engine/EngineIntrinsics.cs +++ b/src/System.Management.Automation/engine/EngineIntrinsics.cs @@ -59,8 +59,8 @@ public PSHost Host "The only constructor for this class should always set the host field"); return _host; - } // get - } // Host + } + } /// /// Gets engine APIs to access the event manager @@ -70,8 +70,8 @@ public PSEventManager Events get { return _context.Events; - } // get - } // Host + } + } /// /// Gets the engine APIs to access providers @@ -82,7 +82,7 @@ public ProviderIntrinsics InvokeProvider { return _context.EngineSessionState.InvokeProvider; } - } // InvokeProvider + } /// /// Gets the engine APIs to access session state @@ -93,7 +93,7 @@ public SessionState SessionState { return _context.EngineSessionState.PublicSessionState; } - } // SessionState + } /// /// Gets the engine APIs to invoke a command @@ -111,6 +111,6 @@ public CommandInvocationIntrinsics InvokeCommand private PSHost _host; private CommandInvocationIntrinsics _invokeCommand; #endregion private data - } // EngineIntrinsics + } } diff --git a/src/System.Management.Automation/engine/ErrorPackage.cs b/src/System.Management.Automation/engine/ErrorPackage.cs index a2071255861..a48fcf724b3 100644 --- a/src/System.Management.Automation/engine/ErrorPackage.cs +++ b/src/System.Management.Automation/engine/ErrorPackage.cs @@ -182,7 +182,7 @@ public enum ErrorCategory /// disabled. /// NotEnabled = 31, - } // enum ErrorCategory + } /// /// Contains auxiliary information about an @@ -482,7 +482,7 @@ internal static string Ellipsize(CultureInfo uiCultureInfo, string original) string.Format(uiCultureInfo, ErrorPackage.Ellipsize, first, last); } #endregion Private - } // class ErrorCategoryInfo + } /// /// additional details about an @@ -806,7 +806,7 @@ private string BuildMessage( return string.Empty; // fallback to Exception.Message } return BuildMessage(template, baseName, resourceId, args); - } // BuildMessage + } private string BuildMessage( IResourceSupplier resourceSupplier, string baseName, @@ -839,7 +839,7 @@ private string BuildMessage( return string.Empty; // fallback to Exception.Message } return BuildMessage(template, baseName, resourceId, args); - } // BuildMessage + } private string BuildMessage( System.Reflection.Assembly assembly, string baseName, @@ -872,7 +872,7 @@ private string BuildMessage( return string.Empty; // fallback to Exception.Message } return BuildMessage(template, baseName, resourceId, args); - } // BuildMessage + } private string BuildMessage( string template, string baseName, @@ -900,10 +900,10 @@ private string BuildMessage( _textLookupError = e; return string.Empty; // fallback to Exception.Message } - } // BuildMessage + } #endregion Private - } // class ErrorDetails + } /// /// Represents an error. @@ -1668,7 +1668,7 @@ public override string ToString() } #endregion ToString - } // class ErrorRecord + } /// /// Dummy generic class for type inference purposes on typed catch blocks. @@ -1802,6 +1802,6 @@ public interface IResourceSupplier /// the error message template string corresponding to baseName and resourceId string GetResourceString(string baseName, string resourceId); } -} // namespace System.Management.Automation +} #pragma warning restore 56506 diff --git a/src/System.Management.Automation/engine/ExecutionContext.cs b/src/System.Management.Automation/engine/ExecutionContext.cs index f4b749b7dac..1e2836f909e 100644 --- a/src/System.Management.Automation/engine/ExecutionContext.cs +++ b/src/System.Management.Automation/engine/ExecutionContext.cs @@ -547,7 +547,7 @@ internal object GetVariableValue(VariablePath path, object defaultValue) internal void SetVariable(VariablePath path, object newValue) { EngineSessionState.SetVariable(path, newValue, true, CommandOrigin.Internal); - } // SetVariable + } internal T GetEnumPreference(VariablePath preferenceVariablePath, T defaultPref, out bool defaultUsed) { @@ -883,7 +883,7 @@ internal void AppendDollarError(object obj) numToErase); } arraylist.Insert(0, obj); - } // AppendDollarError + } #endregion #region Scope or Commands (in pipeline) Depth Count diff --git a/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs b/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs index 855e1bd3248..ae6c1e8f966 100644 --- a/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs +++ b/src/System.Management.Automation/engine/ExtendedTypeSystemException.cs @@ -67,7 +67,7 @@ protected ExtendedTypeSystemException(SerializationInfo info, StreamingContext c #endregion ctor - } // ExtendedTypeSystemException + } /// /// Defines the exception thrown for Method related errors @@ -134,7 +134,7 @@ protected MethodException(SerializationInfo info, StreamingContext context) #endregion ctor - } // MethodException + } /// /// Defines the exception thrown for Method invocation exceptions @@ -199,7 +199,7 @@ protected MethodInvocationException(SerializationInfo info, StreamingContext con #endregion ctor - } // GetValueInvocationException + } /// /// Defines the exception thrown for errors getting the value of properties @@ -262,7 +262,7 @@ protected GetValueException(SerializationInfo info, StreamingContext context) #endregion ctor - } // GetValueException + } /// /// Defines the exception thrown for errors getting the value of properties @@ -326,7 +326,7 @@ protected PropertyNotFoundException(SerializationInfo info, StreamingContext con #endregion ctor - } // PropertyNotFoundException + } /// /// Defines the exception thrown for exceptions thrown by property getters @@ -389,7 +389,7 @@ protected GetValueInvocationException(SerializationInfo info, StreamingContext c #endregion ctor - } // GetValueInvocationException + } /// /// Defines the exception thrown for errors setting the value of properties @@ -450,7 +450,7 @@ protected SetValueException(SerializationInfo info, StreamingContext context) #endregion ctor - } // SetValueException + } /// /// Defines the exception thrown for exceptions thrown by property setters @@ -511,7 +511,7 @@ protected SetValueInvocationException(SerializationInfo info, StreamingContext c #endregion ctor - } // SetValueInvocationException + } /// /// Defines the exception thrown for type conversion errors diff --git a/src/System.Management.Automation/engine/ExternalScriptInfo.cs b/src/System.Management.Automation/engine/ExternalScriptInfo.cs index 4b9293cbec3..13466039096 100644 --- a/src/System.Management.Automation/engine/ExternalScriptInfo.cs +++ b/src/System.Management.Automation/engine/ExternalScriptInfo.cs @@ -559,7 +559,7 @@ private static void ThrowCommandNotFoundException(Exception innerException) CommandNotFoundException cmdE = new CommandNotFoundException(innerException.Message, innerException); throw cmdE; } - } // ExternalScriptInfo + } /// /// Thrown when fail to parse #requires statements. Caught by CommandDiscovery. @@ -595,5 +595,5 @@ internal PSSnapInSpecification(string psSnapinName) /// public Version Version { get; internal set; } } -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/engine/FilterInfo.cs b/src/System.Management.Automation/engine/FilterInfo.cs index f2649af17ea..93e89a19409 100644 --- a/src/System.Management.Automation/engine/FilterInfo.cs +++ b/src/System.Management.Automation/engine/FilterInfo.cs @@ -27,7 +27,7 @@ public class FilterInfo : FunctionInfo /// internal FilterInfo(string name, ScriptBlock filter, ExecutionContext context) : this(name, filter, context, null) { - } // FilterInfo ctor + } /// /// Creates an instance of the FilterInfo class with the specified name and ScriptBlock @@ -51,7 +51,7 @@ internal FilterInfo(string name, ScriptBlock filter, ExecutionContext context, s : base(name, filter, context, helpFile) { SetCommandType(CommandTypes.Filter); - } // FilterInfo ctor + } /// /// Creates an instance of the FilterInfo class with the specified name and ScriptBlock @@ -73,7 +73,7 @@ internal FilterInfo(string name, ScriptBlock filter, ExecutionContext context, s /// internal FilterInfo(string name, ScriptBlock filter, ScopedItemOptions options, ExecutionContext context) : this(name, filter, options, context, null) { - } // FilterInfo ctor + } /// /// Creates an instance of the FilterInfo class with the specified name and ScriptBlock @@ -100,7 +100,7 @@ internal FilterInfo(string name, ScriptBlock filter, ScopedItemOptions options, : base(name, filter, options, context, helpFile) { SetCommandType(CommandTypes.Filter); - } // FilterInfo ctor + } /// /// This is a copy constructor, used primarily for get-command. @@ -136,5 +136,5 @@ internal override HelpCategory HelpCategory { get { return HelpCategory.Filter; } } - } // FilterInfo -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/FunctionInfo.cs b/src/System.Management.Automation/engine/FunctionInfo.cs index 309fd374f00..12b55a3526e 100644 --- a/src/System.Management.Automation/engine/FunctionInfo.cs +++ b/src/System.Management.Automation/engine/FunctionInfo.cs @@ -31,7 +31,7 @@ public class FunctionInfo : CommandInfo, IScriptCommandInfo /// internal FunctionInfo(string name, ScriptBlock function, ExecutionContext context) : this(name, function, context, null) { - } // FunctionInfo ctor + } /// /// Creates an instance of the FunctionInfo class with the specified name and ScriptBlock @@ -64,7 +64,7 @@ internal FunctionInfo(string name, ScriptBlock function, ExecutionContext contex this.Module = function.Module; _helpFile = helpFile; - } // FunctionInfo ctor + } /// /// Creates an instance of the FunctionInfo class with the specified name and ScriptBlock @@ -86,7 +86,7 @@ internal FunctionInfo(string name, ScriptBlock function, ExecutionContext contex /// internal FunctionInfo(string name, ScriptBlock function, ScopedItemOptions options, ExecutionContext context) : this(name, function, options, context, null) { - } // FunctionInfo ctor + } /// /// Creates an instance of the FunctionInfo class with the specified name and ScriptBlock @@ -113,7 +113,7 @@ internal FunctionInfo(string name, ScriptBlock function, ScopedItemOptions optio : this(name, function, context, helpFile) { _options = options; - } // FunctionInfo ctor + } /// /// This is a copy constructor, used primarily for get-command. @@ -402,7 +402,7 @@ public string Verb { return _verb; } - } // Verb + } private string _verb = String.Empty; /// @@ -414,7 +414,7 @@ public string Noun { return _noun; } - } // Noun + } private string _noun = String.Empty; /// @@ -430,7 +430,7 @@ internal set { _helpFile = value; } - } // HelpFile + } private string _helpFile = String.Empty; /// @@ -486,5 +486,5 @@ public override ReadOnlyCollection OutputType { get { return ScriptBlock.OutputType; } } - } // FunctionInfo -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/GetCommandCommand.cs b/src/System.Management.Automation/engine/GetCommandCommand.cs index 536fb15d3eb..cffaac3a5e7 100644 --- a/src/System.Management.Automation/engine/GetCommandCommand.cs +++ b/src/System.Management.Automation/engine/GetCommandCommand.cs @@ -63,7 +63,7 @@ public string[] Name } } } - } // Path + } private string[] _names; private bool _nameContainsWildcard; @@ -76,7 +76,7 @@ public string[] Verb get { return _verbs; - } // get + } set { @@ -86,8 +86,8 @@ public string[] Verb } _verbs = value; _verbPatterns = null; - } // set - } // Verb + } + } private string[] _verbs = Utils.EmptyArray(); /// @@ -100,7 +100,7 @@ public string[] Noun get { return _nouns; - } // get + } set { @@ -110,8 +110,8 @@ public string[] Noun } _nouns = value; _nounPatterns = null; - } // set - } // Noun + } + } private string[] _nouns = Utils.EmptyArray(); /// @@ -125,7 +125,7 @@ public string[] Module get { return _modules; - } // get + } set { @@ -137,7 +137,7 @@ public string[] Module _modulePatterns = null; _isModuleSpecified = true; - } // set + } } private string[] _modules = Utils.EmptyArray(); private bool _isModuleSpecified = false; @@ -176,14 +176,14 @@ public CommandTypes CommandType get { return _commandType; - } // get + } set { _commandType = value; _isCommandTypeSpecified = true; - } // set - } // Noun + } + } private CommandTypes _commandType = CommandTypes.All; private bool _isCommandTypeSpecified = false; diff --git a/src/System.Management.Automation/engine/ItemCmdletProviderInterfaces.cs b/src/System.Management.Automation/engine/ItemCmdletProviderInterfaces.cs index 0218b127d1f..18d63d1e9e4 100644 --- a/src/System.Management.Automation/engine/ItemCmdletProviderInterfaces.cs +++ b/src/System.Management.Automation/engine/ItemCmdletProviderInterfaces.cs @@ -22,7 +22,7 @@ private ItemCmdletProviderIntrinsics() Dbg.Diagnostics.Assert( false, "This constructor should never be called. Only the constructor that takes an instance of SessionState should be called."); - } // CmdletProviderIntrinsics private + } /// /// Constructs a facade over the "real" session state API @@ -42,7 +42,7 @@ internal ItemCmdletProviderIntrinsics(Cmdlet cmdlet) _cmdlet = cmdlet; _sessionState = cmdlet.Context.EngineSessionState; - } // CmdletProviderIntrinsics internal + } /// /// Constructs a facade over the "real" session state API @@ -61,7 +61,7 @@ internal ItemCmdletProviderIntrinsics(SessionStateInternal sessionState) } _sessionState = sessionState; - } // CmdletProviderIntrinsics internal + } #endregion Constructors @@ -108,7 +108,7 @@ public Collection Get(string path) // Parameter validation is done in the session state object return _sessionState.GetItem(new string[] { path }, false, false); - } // GetItem + } /// /// Gets the item at the specified path. @@ -155,7 +155,7 @@ public Collection Get(string[] path, bool force, bool literalPath) // Parameter validation is done in the session state object return _sessionState.GetItem(path, force, literalPath); - } // GetItem + } /// /// Gets the item at the specified path. @@ -199,7 +199,7 @@ internal void Get(string path, CmdletProviderContext context) // Parameter validation is done in the session state object _sessionState.GetItem(new string[] { path }, context); - } // GetItem + } /// /// Gets the dynamic parameters for the get-item cmdlet. @@ -240,7 +240,7 @@ internal object GetItemDynamicParameters(string path, CmdletProviderContext cont // Parameter validation is done in the session state object return _sessionState.GetItemDynamicParameters(path, context); - } // GetItemDynamicParameters + } #endregion GetItem @@ -288,7 +288,7 @@ public Collection Set(string path, object value) // Parameter validation is done in the session state object return _sessionState.SetItem(new string[] { path }, value, false, false); - } // SetItem + } /// /// Sets the item at the specified path. @@ -338,7 +338,7 @@ public Collection Set(string[] path, object value, bool force, bool li // Parameter validation is done in the session state object return _sessionState.SetItem(path, value, force, literalPath); - } // SetItem + } /// /// Sets the item at the specified path. @@ -385,7 +385,7 @@ internal void Set(string path, object value, CmdletProviderContext context) // Parameter validation is done in the session state object _sessionState.SetItem(new string[] { path }, value, context); - } // SetItem + } /// /// Gets the dynamic parameters for the set-item cmdlet. @@ -432,7 +432,7 @@ internal object SetItemDynamicParameters( // Parameter validation is done in the session state object return _sessionState.SetItemDynamicParameters(path, value, context); - } // SetItemDynamicParameters + } #endregion SetItem @@ -477,7 +477,7 @@ public Collection Clear(string path) // Parameter validation is done in the session state object return _sessionState.ClearItem(new string[] { path }, false, false); - } // ClearItem + } /// /// Clears the item at the specified path. @@ -524,7 +524,7 @@ public Collection Clear(string[] path, bool force, bool literalPath) // Parameter validation is done in the session state object return _sessionState.ClearItem(path, force, literalPath); - } // ClearItem + } /// /// Clears the item at the specified path. @@ -568,7 +568,7 @@ internal void Clear(string path, CmdletProviderContext context) // Parameter validation is done in the session state object _sessionState.ClearItem(new string[] { path }, context); - } // ClearItem + } /// /// Gets the dynamic parameters for the clear-item cmdlet. @@ -609,7 +609,7 @@ internal object ClearItemDynamicParameters(string path, CmdletProviderContext co // Parameter validation is done in the session state object return _sessionState.ClearItemDynamicParameters(path, context); - } // ClearItemDynamicParameters + } #endregion ClearItem @@ -651,7 +651,7 @@ public void Invoke(string path) // Parameter validation is done in the session state object _sessionState.InvokeDefaultAction(new string[] { path }, false); - } // InvokeDefaultAction + } /// /// Invokes the default action of the item(s) at the specified path(s). @@ -692,7 +692,7 @@ public void Invoke(string[] path, bool literalPath) // Parameter validation is done in the session state object _sessionState.InvokeDefaultAction(path, literalPath); - } // InvokeDefaultAction + } /// /// Invokes the default action for the item at the specified path. @@ -733,7 +733,7 @@ internal void Invoke(string path, CmdletProviderContext context) // Parameter validation is done in the session state object _sessionState.InvokeDefaultAction(new string[] { path }, context); - } // InvokeDefaultAction + } /// /// Gets the dynamic parameters for the invoke-item cmdlet. @@ -774,7 +774,7 @@ internal object InvokeItemDynamicParameters(string path, CmdletProviderContext c // Parameter validation is done in the session state object return _sessionState.InvokeDefaultActionDynamicParameters(path, context); - } // InvokeItemDynamicParameters + } #endregion InvokeDefaultAction @@ -822,7 +822,7 @@ public Collection Rename(string path, string newName) // Parameter validation is done in the session state object return _sessionState.RenameItem(path, newName, false); - } // RenameItem + } /// /// Renames the item at the given path. @@ -869,7 +869,7 @@ public Collection Rename(string path, string newName, bool force) // Parameter validation is done in the session state object return _sessionState.RenameItem(path, newName, force); - } // RenameItem + } /// /// Renames the item at the given path. @@ -919,7 +919,7 @@ internal void Rename( // Parameter validation is done in the session state object _sessionState.RenameItem(path, newName, context); - } // RenameItem + } /// /// Gets the dynamic parameters for the rename-item cmdlet. @@ -966,7 +966,7 @@ internal object RenameItemDynamicParameters( // Parameter validation is done in the session state object return _sessionState.RenameItemDynamicParameters(path, newName, context); - } // RenameItemDynamicParameters + } #endregion RenameItem @@ -1024,7 +1024,7 @@ public Collection New( // Parameter validation is done in the session state object return _sessionState.NewItem(new string[] { path }, name, itemTypeName, content, false); - } // NewItem + } /// /// Creates a new item at the given path. @@ -1082,7 +1082,7 @@ public Collection New( // Parameter validation is done in the session state object return _sessionState.NewItem(path, name, itemTypeName, content, force); - } // NewItem + } /// /// Creates a new item at the given path. @@ -1140,7 +1140,7 @@ internal void New( // Parameter validation is done in the session state object _sessionState.NewItem(new string[] { path }, name, type, content, context); - } // NewItem + } /// /// Gets the dynamic parameters for the new-item cmdlet. @@ -1191,7 +1191,7 @@ internal object NewItemDynamicParameters( // Parameter validation is done in the session state object return _sessionState.NewItemDynamicParameters(path, type, content, context); - } // NewItemDynamicParameters + } #endregion NewItem @@ -1238,7 +1238,7 @@ public void Remove(string path, bool recurse) // Parameter validation is done in the session state object _sessionState.RemoveItem(new string[] { path }, recurse, false, false); - } // RemoveItem + } /// /// Removes the items at the given path. @@ -1287,7 +1287,7 @@ public void Remove(string[] path, bool recurse, bool force, bool literalPath) // Parameter validation is done in the session state object _sessionState.RemoveItem(path, recurse, force, literalPath); - } // RemoveItem + } /// /// Removes the items at the given path. @@ -1333,7 +1333,7 @@ internal void Remove( // Parameter validation is done in the session state object _sessionState.RemoveItem(new string[] { path }, recurse, context); - } // RemoveItem + } /// /// Gets the dynamic parameters for the remove-item cmdlet. @@ -1382,7 +1382,7 @@ internal object RemoveItemDynamicParameters( // Parameter validation is done in the session state object return _sessionState.RemoveItemDynamicParameters(path, recurse, context); - } // RemoveItemDynamicParameters + } #endregion RemoveItem @@ -1441,7 +1441,7 @@ public Collection Copy( // Parameter validation is done in the session state object return _sessionState.CopyItem(new string[] { path }, destinationPath, recurse, copyContainers, false, false); - } // CopyItem + } /// /// Copy item at the specified path @@ -1504,7 +1504,7 @@ public Collection Copy( // Parameter validation is done in the session state object return _sessionState.CopyItem(path, destinationPath, recurse, copyContainers, force, literalPath); - } // CopyItem + } /// /// Copy item at the specified path @@ -1563,7 +1563,7 @@ internal void Copy( // Parameter validation is done in the session state object _sessionState.CopyItem(new string[] { path }, destinationPath, recurse, copyContainers, context); - } // CopyItem + } /// /// Gets the dynamic parameters for the copy-item cmdlet. @@ -1615,7 +1615,7 @@ internal object CopyItemDynamicParameters( // Parameter validation is done in the session state object return _sessionState.CopyItemDynamicParameters(path, destination, recurse, context); - } // CopyItemDynamicParameters + } #endregion CopyItem @@ -1671,7 +1671,7 @@ public Collection Move(string path, string destination) // Parameter validation is done in the session state object return _sessionState.MoveItem(new string[] { path }, destination, false, false); - } // MoveItem + } /// /// Moves the item at the specified path to the specified destination. @@ -1729,7 +1729,7 @@ public Collection Move(string[] path, string destination, bool force, // Parameter validation is done in the session state object return _sessionState.MoveItem(path, destination, force, literalPath); - } // MoveItem + } /// /// Moves the item at the specified path to the specified destination. @@ -1778,7 +1778,7 @@ internal void Move( // Parameter validation is done in the session state object _sessionState.MoveItem(new string[] { path }, destination, context); - } // MoveItem + } /// /// Gets the dynamic parameters for the move-item cmdlet. @@ -1825,7 +1825,7 @@ internal object MoveItemDynamicParameters( // Parameter validation is done in the session state object return _sessionState.MoveItemDynamicParameters(path, destination, context); - } // MoveItemDynamicParameters + } #endregion MoveItem @@ -1866,7 +1866,7 @@ public bool Exists(string path) // Parameter validation is done in the session state object return _sessionState.ItemExists(path, false, false); - } // ItemExists + } /// /// Determines if an item at the given path exits. @@ -1909,7 +1909,7 @@ public bool Exists(string path, bool force, bool literalPath) // Parameter validation is done in the session state object return _sessionState.ItemExists(path, force, literalPath); - } // ItemExists + } /// /// Determines if an item at the given path exits. @@ -1951,7 +1951,7 @@ internal bool Exists( // Parameter validation is done in the session state object return _sessionState.ItemExists(path, context); - } // ItemExists + } /// /// Gets the dynamic parameters for the test-path cmdlet. @@ -1993,7 +1993,7 @@ internal object ItemExistsDynamicParameters( // Parameter validation is done in the session state object return _sessionState.ItemExistsDynamicParameters(path, context); - } // ItemExistsDynamicParameters + } #endregion ItemExists #region IsContainer @@ -2032,7 +2032,7 @@ public bool IsContainer(string path) // Parameter validation is done in the session state object return _sessionState.IsItemContainer(path); - } // IsItemContainer + } /// /// Determines if the specified path is to an item that is a container. @@ -2073,7 +2073,7 @@ internal bool IsContainer( // Parameter validation is done in the session state object return _sessionState.IsItemContainer(path, context); - } // IsItemContainer + } #endregion IsItemContainer @@ -2085,7 +2085,7 @@ internal bool IsContainer( private SessionStateInternal _sessionState; #endregion private data - } // ItemCmdletProviderIntrinsics + } /// /// Determines how the source container of a copy operation diff --git a/src/System.Management.Automation/engine/MergedCommandParameterMetadata.cs b/src/System.Management.Automation/engine/MergedCommandParameterMetadata.cs index 2ca7a565daf..f25d80ea7da 100644 --- a/src/System.Management.Automation/engine/MergedCommandParameterMetadata.cs +++ b/src/System.Management.Automation/engine/MergedCommandParameterMetadata.cs @@ -54,7 +54,7 @@ internal List ReplaceMetadata(MergedCommandParam "After replacement with the metadata of the new parameters, ParameterSetCount should be equal to nextAvailableParameterSetIndex"); return result; - } // ReplaceMetadata + } /// /// Merges the specified metadata with the other metadata already defined @@ -170,7 +170,7 @@ internal int ParameterSetCount { return _parameterSetMap.Count; } - } // ParameterSetCount + } /// /// Gets a bit-field representing all valid parameter sets @@ -249,7 +249,7 @@ private int AddParameterSetToMap(string parameterSetName) } } return index; - } // AddParameterSetToMap + } /// /// Loops through all the parameters and retrieves the parameter set names. In the process @@ -327,7 +327,7 @@ internal uint GenerateParameterSetMappingFromMetadata(string defaultParameterSet parameter.Parameter.ParameterSetFlags = parameterSetBitField; } return defaultParameterSetFlag; - } // GenerateParameterSetMappingFromMetadata + } /// /// Gets the parameter set name for the specified parameter set. @@ -379,7 +379,7 @@ internal string GetParameterSetName(uint parameterSet) } } return result; - } // GetParameterSetName + } /// /// Helper function to retrieve the name of the parameter @@ -561,7 +561,7 @@ internal MergedCompiledCommandParameter GetMatchingParameter( result = matchingParameters[0]; } return result; - } // GetMatchingParameter + } /// /// Gets a collection of all the parameters that are allowed in the parameter set @@ -586,7 +586,7 @@ internal Collection GetParametersInParameterSet( } } return result; - } // GetParametersInParameterSet + } /// /// Gets a dictionary of the compiled parameter metadata for this Type. @@ -617,7 +617,7 @@ internal void ResetReadOnly() _bindableParameters = new Dictionary(_bindableParameters, StringComparer.OrdinalIgnoreCase); _aliasedParameters = new Dictionary(_aliasedParameters, StringComparer.OrdinalIgnoreCase); } - } // MergedCommandParameterMetadata + } /// /// Makes an association between a CompiledCommandParameter and the type diff --git a/src/System.Management.Automation/engine/MinishellParameterBinderController.cs b/src/System.Management.Automation/engine/MinishellParameterBinderController.cs index c0309de1800..0b2280ae366 100644 --- a/src/System.Management.Automation/engine/MinishellParameterBinderController.cs +++ b/src/System.Management.Automation/engine/MinishellParameterBinderController.cs @@ -250,7 +250,7 @@ internal Collection BindParameters(Collection s_emptyReturnCollection = new Collection(); diff --git a/src/System.Management.Automation/engine/Modules/ExportModuleMemberCommand.cs b/src/System.Management.Automation/engine/Modules/ExportModuleMemberCommand.cs index c502b195429..317f2a93ee6 100644 --- a/src/System.Management.Automation/engine/Modules/ExportModuleMemberCommand.cs +++ b/src/System.Management.Automation/engine/Modules/ExportModuleMemberCommand.cs @@ -158,4 +158,4 @@ protected override void ProcessRecord() } } #endregion Export-ModuleMember -} // Microsoft.PowerShell.Commands +} diff --git a/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs b/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs index 96e19952cba..6d64a7e50e8 100644 --- a/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs +++ b/src/System.Management.Automation/engine/Modules/ImportModuleCommand.cs @@ -1814,4 +1814,4 @@ private void SetModuleBaseForEngineModules(string moduleName, System.Management. } } } -} // Microsoft.PowerShell.Commands +} diff --git a/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs b/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs index c37ab853324..3929089b43a 100644 --- a/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs +++ b/src/System.Management.Automation/engine/Modules/ModuleCmdletBase.cs @@ -7486,7 +7486,7 @@ internal bool TryGetFromModuleTable(string key, out PSModuleInfo moduleInfo, boo return foundModule; } - } // end ModuleCmdletBase + } /// /// Holds the result of a binary module analysis. diff --git a/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs b/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs index d9985110ef4..e32597f2944 100644 --- a/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs +++ b/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs @@ -1714,7 +1714,7 @@ private static AliasInfo NewAliasInfo(AliasInfo alias, SessionStateInternal sess }; return aliasCopy; } - } // ModuleIntrinsics + } /// /// Enumeration of reasons for a failure to match a module by constraints. @@ -1769,4 +1769,4 @@ public interface IModuleAssemblyCleanup /// void OnRemove(PSModuleInfo psModuleInfo); } -} // System.Management.Automation +} diff --git a/src/System.Management.Automation/engine/Modules/ModuleSpecification.cs b/src/System.Management.Automation/engine/Modules/ModuleSpecification.cs index 872385d845b..002566dd52b 100644 --- a/src/System.Management.Automation/engine/Modules/ModuleSpecification.cs +++ b/src/System.Management.Automation/engine/Modules/ModuleSpecification.cs @@ -341,4 +341,4 @@ public int GetHashCode(ModuleSpecification obj) } #endregion -} // Microsoft.PowerShell.Commands +} diff --git a/src/System.Management.Automation/engine/Modules/NewModuleCommand.cs b/src/System.Management.Automation/engine/Modules/NewModuleCommand.cs index a01342d985d..6f16ed5404f 100644 --- a/src/System.Management.Automation/engine/Modules/NewModuleCommand.cs +++ b/src/System.Management.Automation/engine/Modules/NewModuleCommand.cs @@ -209,4 +209,4 @@ protected override void EndProcessing() } #endregion -} // Microsoft.PowerShell.Commands +} diff --git a/src/System.Management.Automation/engine/Modules/NewModuleManifestCommand.cs b/src/System.Management.Automation/engine/Modules/NewModuleManifestCommand.cs index 4cea8f9c446..62c14ee4d89 100644 --- a/src/System.Management.Automation/engine/Modules/NewModuleManifestCommand.cs +++ b/src/System.Management.Automation/engine/Modules/NewModuleManifestCommand.cs @@ -1167,4 +1167,4 @@ private void ValidateUriParameterValue(Uri uri, string parameterName) } #endregion -} // Microsoft.PowerShell.Commands +} diff --git a/src/System.Management.Automation/engine/Modules/PSModuleInfo.cs b/src/System.Management.Automation/engine/Modules/PSModuleInfo.cs index 7cb64c0beb3..977c351e8f6 100644 --- a/src/System.Management.Automation/engine/Modules/PSModuleInfo.cs +++ b/src/System.Management.Automation/engine/Modules/PSModuleInfo.cs @@ -1533,7 +1533,7 @@ internal static bool RemoveFromAppDomainLevelCache(string moduleName) private static readonly System.Collections.Concurrent.ConcurrentDictionary s_appdomainModulePathCache = new System.Collections.Concurrent.ConcurrentDictionary(StringComparer.OrdinalIgnoreCase); - } // PSModuleInfo + } /// /// Indicates the type of a module. diff --git a/src/System.Management.Automation/engine/Modules/RemoveModuleCommand.cs b/src/System.Management.Automation/engine/Modules/RemoveModuleCommand.cs index 6f4fa1992c0..984badafa94 100644 --- a/src/System.Management.Automation/engine/Modules/RemoveModuleCommand.cs +++ b/src/System.Management.Automation/engine/Modules/RemoveModuleCommand.cs @@ -369,4 +369,4 @@ protected override void EndProcessing() } } #endregion Remove-Module -} // Microsoft.PowerShell.Commands +} diff --git a/src/System.Management.Automation/engine/Modules/ScriptAnalysis.cs b/src/System.Management.Automation/engine/Modules/ScriptAnalysis.cs index 21f77b15eef..b9275748f3d 100644 --- a/src/System.Management.Automation/engine/Modules/ScriptAnalysis.cs +++ b/src/System.Management.Automation/engine/Modules/ScriptAnalysis.cs @@ -553,4 +553,4 @@ internal class RequiredModuleInfo internal string Name { get; set; } internal List CommandsToPostFilter { get; set; } } -} // System.Management.Automation +} diff --git a/src/System.Management.Automation/engine/Modules/TestModuleManifestCommand.cs b/src/System.Management.Automation/engine/Modules/TestModuleManifestCommand.cs index e88a28f976c..2867911924e 100644 --- a/src/System.Management.Automation/engine/Modules/TestModuleManifestCommand.cs +++ b/src/System.Management.Automation/engine/Modules/TestModuleManifestCommand.cs @@ -391,4 +391,4 @@ private bool IsValidGacAssembly(string assemblyName) } #endregion -} // Microsoft.PowerShell.Commands +} diff --git a/src/System.Management.Automation/engine/MshCommandRuntime.cs b/src/System.Management.Automation/engine/MshCommandRuntime.cs index c24844be846..f7a68a05952 100644 --- a/src/System.Management.Automation/engine/MshCommandRuntime.cs +++ b/src/System.Management.Automation/engine/MshCommandRuntime.cs @@ -2315,7 +2315,7 @@ public void Dispose() private InternalCommand _wasPermittedToWrite = null; private bool _wasPermittedToWriteToPipeline = false; private Thread _wasPermittedToWriteThread = null; - } // AllowWrite + } /// /// Stores the exception to be returned from @@ -2382,7 +2382,7 @@ public Exception ManageException(Exception e) internal void SetupErrorVariable() { SetupVariable(VariableStreamKind.Error, this.ErrorVariable, ref _errorVarList); - } // SetupErrorVariable + } private void EnsureVariableParameterAllowed() { @@ -2411,7 +2411,7 @@ internal void AppendErrorToVariables(object obj) AppendDollarError(obj); this.OutputPipe.AppendVariableList(VariableStreamKind.Error, obj); - } // AppendError + } /// /// Appends the object to $global:error. Non-terminating errors @@ -2435,7 +2435,7 @@ private void AppendDollarError(object obj) } Context.AppendDollarError(obj); - } // AppendDollarError + } #endregion Error PSVariable @@ -2454,7 +2454,7 @@ private void AppendDollarError(object obj) internal void SetupWarningVariable() { SetupVariable(VariableStreamKind.Warning, this.WarningVariable, ref _warningVarList); - } // SetupWarningVariable + } /// /// Append a warning to WarningVariable if specified. @@ -2463,7 +2463,7 @@ internal void SetupWarningVariable() internal void AppendWarningVarList(object obj) { this.OutputPipe.AppendVariableList(VariableStreamKind.Warning, obj); - } // AppendWarning + } #endregion Warning PSVariable @@ -2482,7 +2482,7 @@ internal void AppendWarningVarList(object obj) internal void SetupInformationVariable() { SetupVariable(VariableStreamKind.Information, this.InformationVariable, ref _informationVarList); - } // SetupWarningVariable + } internal void SetupVariable(VariableStreamKind streamKind, string variableName, ref IList varList) { @@ -2538,7 +2538,7 @@ internal void SetupVariable(VariableStreamKind streamKind, string variableName, this.OutputPipe.AddVariableList(streamKind, varList); } _state.PSVariable.Set(variableName, varList); - } // SetupVariable + } /// /// Append a Information to InformationVariable if specified. @@ -2547,7 +2547,7 @@ internal void SetupVariable(VariableStreamKind streamKind, string variableName, internal void AppendInformationVarList(object obj) { this.OutputPipe.AppendVariableList(VariableStreamKind.Information, obj); - } // AppendInformation + } #endregion Information PSVariable @@ -2684,7 +2684,7 @@ internal void WriteError(ErrorRecord errorRecord, bool overrideInquire) DoWriteError(new KeyValuePair(errorRecord, preference)); } #endif - } // WriteError + } /// /// Not permitted at this time or from this thread @@ -2735,7 +2735,7 @@ private void DoWriteError(object obj) ThrowIfWriteNotPermitted(true); _WriteErrorSkipAllowCheck(errorRecord, preference); - } // DoWriteError + } // NOTICE-2004/06/08-JonN 959638 // Use this variant to skip the ThrowIfWriteNotPermitted check @@ -2822,7 +2822,7 @@ internal void _WriteErrorSkipAllowCheck(ErrorRecord errorRecord, ActionPreferenc false // hasSecurityImpact ); break; - } // switch (preference) + } // 2005/01/20 Do not write the object to $error if // ManageException has already done so @@ -2963,7 +2963,7 @@ internal ActionPreference DebugPreference { _debugPreference = value; _isDebugPreferenceSet = true; - } // set + } } private bool _isVerbosePreferenceCached = false; @@ -3054,7 +3054,7 @@ internal ActionPreference WarningPreference _warningPreference = value; IsWarningActionSet = true; - } // set + } } // This is used so that people can tell whether the verbose switch @@ -3075,7 +3075,7 @@ internal bool Verbose { _verboseFlag = value; IsVerboseFlagSet = true; - } // Set + } } internal bool IsVerboseFlagSet { get; private set; } = false; @@ -3098,7 +3098,7 @@ internal SwitchParameter Confirm { _confirmFlag = value; IsConfirmFlagSet = true; - } // set + } } internal bool IsConfirmFlagSet { get; private set; } = false; @@ -3121,7 +3121,7 @@ internal SwitchParameter UseTransaction { _useTransactionFlag = value; UseTransactionFlagSet = true; - } // set + } } internal bool UseTransactionFlagSet { get; private set; } = false; @@ -3145,7 +3145,7 @@ internal bool Debug { _debugFlag = value; IsDebugFlagSet = true; - } // set + } } internal bool IsDebugFlagSet { get; private set; } = false; @@ -3176,7 +3176,7 @@ internal SwitchParameter WhatIf { _whatIfFlag = value; IsWhatIfFlagSet = true; - } // set + } } internal bool IsWhatIfFlagSet { get; private set; } @@ -3217,7 +3217,7 @@ internal ActionPreference ErrorAction _errorAction = value; IsErrorActionSet = true; - } // set + } } internal bool IsErrorActionSet { get; private set; } = false; @@ -3245,7 +3245,7 @@ internal ActionPreference ProgressPreference { _progressPreference = value; _isProgressPreferenceSet = true; - } // set + } } private ActionPreference _progressPreference = InitialSessionState.defaultProgressPreference; private bool _isProgressPreferenceSet = false; @@ -3279,7 +3279,7 @@ internal ActionPreference InformationPreference _informationPreference = value; IsInformationActionSet = true; - } // set + } } private ActionPreference _informationPreference = InitialSessionState.defaultInformationPreference; @@ -3367,7 +3367,7 @@ internal bool WriteHelper_ShouldWrite( Dbg.Assert(false, "Bad preference value" + preference); return true; } - } // WriteHelper_ShouldWrite + } /// /// Complete implementation of WriteDebug/WriteVerbose/WriteProgress @@ -3442,7 +3442,7 @@ internal ContinueStatus WriteHelper( true, // replaceNoWithHalt false // hasSecurityImpact ); - } // WriteHelper + } /// /// Helper for continue prompt, handles Inquire @@ -3617,7 +3617,7 @@ bool hasSecurityImpact throw ManageException(e); } } while (true); - } // InquireHelper + } /// /// Determines if this is being run in the context of a remote host or not. diff --git a/src/System.Management.Automation/engine/MshSecurityException.cs b/src/System.Management.Automation/engine/MshSecurityException.cs index 27069dcd2c3..0a290f6cea0 100644 --- a/src/System.Management.Automation/engine/MshSecurityException.cs +++ b/src/System.Management.Automation/engine/MshSecurityException.cs @@ -116,6 +116,6 @@ public override string Message get { return _message; } } private string _message; - } // PSSecurityException -} // System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs b/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs index 875cf59cbba..fbd58019c65 100644 --- a/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs +++ b/src/System.Management.Automation/engine/NativeCommandParameterBinder.cs @@ -58,7 +58,7 @@ internal override void BindParameter(string name, object value, CompiledCommandP Diagnostics.Assert(false, "Unreachable code"); throw new NotSupportedException(); - } // BindParameter + } internal override object GetDefaultParameterValue(string name) { @@ -138,7 +138,7 @@ internal String Arguments { return _arguments.ToString(); } - } // Arguments + } private readonly StringBuilder _arguments = new StringBuilder(); #endregion internal members @@ -378,4 +378,4 @@ static private string GetEnumerableArgSeparator(ArrayLiteralAst arrayLiteralAst, private NativeCommand _nativeCommand; #endregion private members } -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/engine/NativeCommandParameterBinderController.cs b/src/System.Management.Automation/engine/NativeCommandParameterBinderController.cs index 8ce3eb09cd3..d69758c83c6 100644 --- a/src/System.Management.Automation/engine/NativeCommandParameterBinderController.cs +++ b/src/System.Management.Automation/engine/NativeCommandParameterBinderController.cs @@ -36,7 +36,7 @@ internal String Arguments { return ((NativeCommandParameterBinder)DefaultParameterBinder).Arguments; } - } // Arguments + } /// /// Passes the binding directly through to the parameter binder. @@ -78,7 +78,7 @@ internal override Collection BindParameters(Collection Diagnostics.Assert(s_emptyReturnCollection.Count == 0, "This list shouldn't be used for anything as it's shared."); return s_emptyReturnCollection; - } // BindParameters + } private static readonly Collection s_emptyReturnCollection = new Collection(); } diff --git a/src/System.Management.Automation/engine/NativeCommandProcessor.cs b/src/System.Management.Automation/engine/NativeCommandProcessor.cs index 7ce7ec20f16..d522aac7dd5 100644 --- a/src/System.Management.Automation/engine/NativeCommandProcessor.cs +++ b/src/System.Management.Automation/engine/NativeCommandProcessor.cs @@ -556,7 +556,7 @@ private void InitNativeProcess() { exceptionToRethrow = e; - } // try + } catch (PipelineStoppedException) { // If we're stopping the process, just rethrow this exception... @@ -717,7 +717,7 @@ internal override void Complete() catch (Win32Exception e) { exceptionToRethrow = e; - } // try + } catch (PipelineStoppedException) { // If we're stopping the process, just rethrow this exception... diff --git a/src/System.Management.Automation/engine/ParameterBinderBase.cs b/src/System.Management.Automation/engine/ParameterBinderBase.cs index 5601b3340fe..5e6106da075 100644 --- a/src/System.Management.Automation/engine/ParameterBinderBase.cs +++ b/src/System.Management.Automation/engine/ParameterBinderBase.cs @@ -660,7 +660,7 @@ internal virtual bool BindParameter( return result; } - } // BindParameter + } /// /// This method ensures that if the parameter is mandatory, and AllowNull, AllowEmptyString, @@ -1306,7 +1306,7 @@ private object CoerceTypeAsNeeded( throw pbe; } - } // TraceScope + } if (result != null) { @@ -1315,7 +1315,7 @@ private object CoerceTypeAsNeeded( } return result; - } // CoerceTypeAsNeeded + } private static bool IsNullParameterValue(object currentValue) { @@ -1869,7 +1869,7 @@ private object EncodeCollection( error.Message); throw bindingException; } - } // (currentValueAsIList == null) + } if (!coercionRequired) { @@ -1881,7 +1881,7 @@ private object EncodeCollection( } while (false); return result; - } // EncodeCollection + } internal static IList GetIList(object value) { @@ -1896,7 +1896,7 @@ internal static IList GetIList(object value) } return result; - } // GetIList + } protected IScriptExtent GetErrorExtent(CommandParameterInternal cpi) { @@ -1919,7 +1919,7 @@ protected IScriptExtent GetParameterErrorExtent(CommandParameterInternal cpi) } #endregion private helpers - } // ParameterBinderBase + } /// /// Represents an unbound parameter object in the engine. It's similar to @@ -2048,5 +2048,5 @@ internal HashSet CopyBoundPositionalParameters() return result; } } -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/engine/ParameterBinderController.cs b/src/System.Management.Automation/engine/ParameterBinderController.cs index a5a6d488834..c5887a7651e 100644 --- a/src/System.Management.Automation/engine/ParameterBinderController.cs +++ b/src/System.Management.Automation/engine/ParameterBinderController.cs @@ -256,7 +256,7 @@ internal void ReparseUnboundArguments() } UnboundArguments = result; - } // ReparseUnboundArgumentsForBinder + } private static bool IsSwitchAndSetValue( String argumentName, @@ -273,7 +273,7 @@ private static bool IsSwitchAndSetValue( } return result; - } // EnsureBoolOrSwitchAndSetValue + } /// /// The argument looks like a parameter if it is a string @@ -717,7 +717,7 @@ out ParameterBindingException outgoingBindingException } } return result; - } // BindPositionalParameters + } /// /// This method only updates the collections contained in the dictionary, not the dictionary @@ -988,7 +988,7 @@ internal static SortedDictionary> result, diff --git a/src/System.Management.Automation/engine/ParameterInfo.cs b/src/System.Management.Automation/engine/ParameterInfo.cs index 5fe7ac5c23f..ef4c12792a0 100644 --- a/src/System.Management.Automation/engine/ParameterInfo.cs +++ b/src/System.Management.Automation/engine/ParameterInfo.cs @@ -142,6 +142,6 @@ private void SetParameterSetData(ParameterSetSpecificMetadata parameterMetadata) } #endregion private members - } // class CommandParameterInfo -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/ParameterSetInfo.cs b/src/System.Management.Automation/engine/ParameterSetInfo.cs index cdcd9df41fa..c56f47393a9 100644 --- a/src/System.Management.Automation/engine/ParameterSetInfo.cs +++ b/src/System.Management.Automation/engine/ParameterSetInfo.cs @@ -332,6 +332,6 @@ private void Initialize(MergedCommandParameterMetadata parameterMetadata, uint p } #endregion private members - } // class CommandParameterSetInfo -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/ParameterSetSpecificMetadata.cs b/src/System.Management.Automation/engine/ParameterSetSpecificMetadata.cs index d1d121d0eb7..7b9aeed2359 100644 --- a/src/System.Management.Automation/engine/ParameterSetSpecificMetadata.cs +++ b/src/System.Management.Automation/engine/ParameterSetSpecificMetadata.cs @@ -209,6 +209,6 @@ internal string GetHelpMessage(Cmdlet cmdlet) } private ParameterAttribute _attribute; - } // ParameterSetSpecificMetadata + } } diff --git a/src/System.Management.Automation/engine/PathInterfaces.cs b/src/System.Management.Automation/engine/PathInterfaces.cs index 3db667b079f..080c771338c 100644 --- a/src/System.Management.Automation/engine/PathInterfaces.cs +++ b/src/System.Management.Automation/engine/PathInterfaces.cs @@ -21,7 +21,7 @@ private PathIntrinsics() Dbg.Diagnostics.Assert( false, "This constructor should never be called. Only the constructor that takes an instance of SessionState should be called."); - } // PathInterfaces private + } /// /// Internal constructor for the PathIntrinsics facade. @@ -43,7 +43,7 @@ internal PathIntrinsics(SessionStateInternal sessionState) } _sessionState = sessionState; - } // PathInterfaces internal + } #endregion Constructors @@ -64,8 +64,8 @@ public PathInfo CurrentLocation "The only constructor for this class should always set the sessionState field"); return _sessionState.CurrentLocation; - } // get - } // CurrentLocation + } + } /// /// Gets the current location for a specific provider @@ -91,7 +91,7 @@ public PathInfo CurrentProviderLocation(string providerName) // Parameter validation is done in the session state object return _sessionState.GetNamespaceCurrentLocation(providerName); - } // CurrentProviderLocation + } /// /// Gets the current location for the file system provider @@ -108,8 +108,8 @@ public PathInfo CurrentFileSystemLocation "The only constructor for this class should always set the sessionState field"); return CurrentProviderLocation(_sessionState.ExecutionContext.ProviderNames.FileSystem); - } // get - } // CurrentFileSystemLocation + } + } /// /// Changes the current location to the specified path. @@ -147,7 +147,7 @@ public PathInfo SetLocation(string path) // Parameter validation is done in the session state object return _sessionState.SetLocation(path); - } // SetLocation + } /// /// Changes the current location to the specified path. @@ -188,7 +188,7 @@ internal PathInfo SetLocation(string path, CmdletProviderContext context) // Parameter validation is done in the session state object return _sessionState.SetLocation(path, context); - } // SetLocation + } /// /// Changes the current location to the specified path. @@ -232,7 +232,7 @@ internal PathInfo SetLocation(string path, CmdletProviderContext context, bool l // Parameter validation is done in the session state object return _sessionState.SetLocation(path, context, literalPath); - } // SetLocation + } /// /// Determines if the specified path is the current location or a parent of the current location. @@ -281,7 +281,7 @@ internal bool IsCurrentLocationOrAncestor(string path, CmdletProviderContext con // Parameter validation is done in the session state object return _sessionState.IsCurrentLocationOrAncestor(path, context); - } // IsCurrentLocationOrAncestor + } /// /// Pushes the current location onto the location stack so that it can be retrieved later. @@ -296,7 +296,7 @@ public void PushCurrentLocation(string stackName) "The only constructor for this class should always set the sessionState field"); _sessionState.PushCurrentLocation(stackName); - } // PushCurrentLocation + } /// /// Gets the location off the top of the location stack. @@ -334,7 +334,7 @@ public PathInfo PopLocation(string stackName) "The only constructor for this class should always set the sessionState field"); return _sessionState.PopLocation(stackName); - } // PopLocation + } /// /// Gets the location stack and all the locations on it. @@ -349,7 +349,7 @@ public PathInfoStack LocationStack(string stackName) "The only constructor for this class should always set the sessionState field"); return _sessionState.LocationStack(stackName); - } // LocationStack + } /// /// Sets the default location stack to that specified by the stack ID. @@ -411,7 +411,7 @@ public Collection GetResolvedPSPathFromPSPath(string path) // The parameters will be verified by the path resolver Provider.CmdletProvider providerInstance = null; return PathResolver.GetGlobbedMonadPathsFromMonadPath(path, false, out providerInstance); - } // GetResolvedPSPathFromPSPath + } /// /// Resolves a drive or provider qualified absolute or relative path that may contain @@ -456,7 +456,7 @@ internal Collection GetResolvedPSPathFromPSPath( // The parameters will be verified by the path resolver Provider.CmdletProvider providerInstance = null; return PathResolver.GetGlobbedMonadPathsFromMonadPath(path, false, context, out providerInstance); - } // GetResolvedPSPathFromPSPath + } /// /// Resolves a drive or provider qualified absolute or relative path that may contain @@ -508,7 +508,7 @@ public Collection GetResolvedProviderPathFromPSPath( // The parameters will be verified by the path resolver Provider.CmdletProvider providerInstance = null; return PathResolver.GetGlobbedProviderPathsFromMonadPath(path, false, out provider, out providerInstance); - } // GetResolvedProviderPathFromPSPath + } internal Collection GetResolvedProviderPathFromPSPath( string path, @@ -518,7 +518,7 @@ internal Collection GetResolvedProviderPathFromPSPath( // The parameters will be verified by the path resolver Provider.CmdletProvider providerInstance = null; return PathResolver.GetGlobbedProviderPathsFromMonadPath(path, allowNonexistingPaths, out provider, out providerInstance); - } // GetResolvedProviderPathFromPSPath + } /// /// Resolves a drive or provider qualified absolute or relative path that may contain @@ -576,7 +576,7 @@ internal Collection GetResolvedProviderPathFromPSPath( Provider.CmdletProvider providerInstance = null; return PathResolver.GetGlobbedProviderPathsFromMonadPath(path, false, context, out provider, out providerInstance); - } // GetResolvedProviderPathFromPSPath + } /// /// Resolves a drive or provider qualified absolute or relative path that may contain @@ -620,7 +620,7 @@ public Collection GetResolvedProviderPathFromProviderPath( // The parameters will be verified by the path resolver Provider.CmdletProvider providerInstance = null; return PathResolver.GetGlobbedProviderPathsFromProviderPath(path, false, providerId, out providerInstance); - } // GetResolvedProviderPathFromProviderPath + } /// /// Resolves a drive or provider qualified absolute or relative path that may contain @@ -670,7 +670,7 @@ internal Collection GetResolvedProviderPathFromProviderPath( Provider.CmdletProvider providerInstance = null; return PathResolver.GetGlobbedProviderPathsFromProviderPath(path, false, providerId, context, out providerInstance); - } // GetResolvedProviderPathFromProviderPath + } /// /// Converts a drive or provider qualified absolute or relative path that may contain @@ -713,7 +713,7 @@ public string GetUnresolvedProviderPathFromPSPath(string path) // The parameters will be verified by the path resolver return PathResolver.GetProviderPath(path); - } // GetUnresolvedProviderPathFromPSPath + } /// /// Converts a drive or provider qualified absolute or relative path that may contain @@ -773,7 +773,7 @@ public string GetUnresolvedProviderPathFromPSPath( context.ThrowFirstErrorOrDoNothing(); return result; - } // GetUnresolvedProviderPathFromPSPath + } /// /// Converts a drive or provider qualified absolute or relative path that may contain @@ -830,7 +830,7 @@ internal string GetUnresolvedProviderPathFromPSPath( // The parameters will be verified by the path resolver return PathResolver.GetProviderPath(path, context, out provider, out drive); - } // GetUnresolvedProviderPathFromPSPath #endregion Public methods + } /// /// Determines if the give path is an Msh provider-qualified path. @@ -853,7 +853,7 @@ public bool IsProviderQualified(string path) // The parameters will be verified by the path resolver return LocationGlobber.IsProviderQualifiedPath(path); - } // IsProviderQualifiedPath + } /// /// Determines if the given path is a drive-qualified absolute path. @@ -882,7 +882,7 @@ public bool IsPSAbsolute(string path, out string driveName) // The parameters will be verified by the path resolver return PathResolver.IsAbsolutePath(path, out driveName); - } // IsPSAbsolutePath + } #region Combine @@ -923,7 +923,7 @@ public string Combine(string parent, string child) // Parameter validation is done in the session state object return _sessionState.MakePath(parent, child); - } // Combine + } /// /// Combines two strings with a provider specific path separator. @@ -965,7 +965,7 @@ internal string Combine(string parent, string child, CmdletProviderContext conte // Parameter validation is done in the session state object return _sessionState.MakePath(parent, child, context); - } // Combine + } #endregion Combine @@ -1004,7 +1004,7 @@ public string ParseParent(string path, string root) // Parameter validation is done in the session state object return _sessionState.GetParentPath(path, root); - } // GetParentPath + } /// /// Gets the parent path of the specified path. @@ -1045,7 +1045,7 @@ internal string ParseParent( // Parameter validation is done in the session state object return _sessionState.GetParentPath(path, root, context, false); - } // GetParentPath + } /// /// Gets the parent path of the specified path. @@ -1132,7 +1132,7 @@ public string ParseChildName(string path) // Parameter validation is done in the session state object return _sessionState.GetChildName(path); - } // ParseChildName + } /// /// Gets the child name of the specified path. @@ -1173,7 +1173,7 @@ internal string ParseChildName( // Parameter validation is done in the session state object return _sessionState.GetChildName(path, context, false); - } // ParseChildName + } /// /// Gets the child name of the specified path. @@ -1220,7 +1220,7 @@ internal string ParseChildName( // Parameter validation is done in the session state object return _sessionState.GetChildName(path, context, useDefaultProvider); - } // ParseChildName + } #endregion ParseChildName @@ -1261,7 +1261,7 @@ public string NormalizeRelativePath(string path, string basePath) // Parameter validation is done in the session state object return _sessionState.NormalizeRelativePath(path, basePath); - } // NormalizeRelativePath + } /// /// Normalizes the path that was passed in and returns the normalized path @@ -1304,7 +1304,7 @@ internal string NormalizeRelativePath( // Parameter validation is done in the session state object return _sessionState.NormalizeRelativePath(path, basePath, context); - } // NormalizeRelativePath + } #endregion NormalizeRelativePath @@ -1344,7 +1344,7 @@ public bool IsValid(string path) // Parameter validation is done in the session state object return _sessionState.IsValidPath(path); - } // IsValid + } /// /// Determines if the MSH path is a syntactically and semantically valid path for the provider. @@ -1385,7 +1385,7 @@ internal bool IsValid( // Parameter validation is done in the session state object return _sessionState.IsValidPath(path, context); - } // IsValid + } #endregion IsValid @@ -1402,13 +1402,13 @@ private LocationGlobber PathResolver "The only constructor for this class should always set the sessionState field"); return _pathResolver ?? (_pathResolver = _sessionState.ExecutionContext.LocationGlobber); - } // get - } // PathResolver + } + } private LocationGlobber _pathResolver; private SessionStateInternal _sessionState; #endregion private data - } // PathIntrinsics + } } diff --git a/src/System.Management.Automation/engine/Pipe.cs b/src/System.Management.Automation/engine/Pipe.cs index 9d2066b5269..4613dd81ca2 100644 --- a/src/System.Management.Automation/engine/Pipe.cs +++ b/src/System.Management.Automation/engine/Pipe.cs @@ -511,7 +511,7 @@ internal void AddItems(object objects) { _downstreamCmdlet.DoExecute(); } - } // internal void AddItems(object objects) + } /// /// Returns an object from the pipe. If pipe is empty returns null. @@ -591,4 +591,4 @@ internal object[] ToArray() return ObjectQueue.ToArray(); } } -} // namespace System.Management.Automation.Internal +} diff --git a/src/System.Management.Automation/engine/PropertyCmdletProviderInterfaces.cs b/src/System.Management.Automation/engine/PropertyCmdletProviderInterfaces.cs index edeedf7aab6..4bf3449b61a 100644 --- a/src/System.Management.Automation/engine/PropertyCmdletProviderInterfaces.cs +++ b/src/System.Management.Automation/engine/PropertyCmdletProviderInterfaces.cs @@ -22,7 +22,7 @@ private PropertyCmdletProviderIntrinsics() Dbg.Diagnostics.Assert( false, "This constructor should never be called. Only the constructor that takes an instance of SessionState should be called."); - } // CmdletProviderIntrinsics private + } /// /// Constructs a facade over the "real" session state API @@ -42,7 +42,7 @@ internal PropertyCmdletProviderIntrinsics(Cmdlet cmdlet) _cmdlet = cmdlet; _sessionState = cmdlet.Context.EngineSessionState; - } // PropertyCmdletProviderIntrinsics internal + } /// /// Constructs a facade over the "real" session state API @@ -61,7 +61,7 @@ internal PropertyCmdletProviderIntrinsics(SessionStateInternal sessionState) } _sessionState = sessionState; - } // PropertyCmdletProviderIntrinsics internal + } #endregion Constructors @@ -114,7 +114,7 @@ public Collection Get( // Parameter validation is done in the session state object return _sessionState.GetProperty(new string[] { path }, providerSpecificPickList, false); - } // GetProperty + } /// /// Gets the specified properties from the specified item(s) @@ -165,7 +165,7 @@ public Collection Get( // Parameter validation is done in the session state object return _sessionState.GetProperty(path, providerSpecificPickList, literalPath); - } // GetProperty + } /// /// Gets the specified properties from the specified item(s) @@ -217,7 +217,7 @@ internal void Get( // Parameter validation is done in the session state object _sessionState.GetProperty(new string[] { path }, providerSpecificPickList, context); - } // GetProperty + } /// /// Gets the dynamic parameters for the get-itemproperty cmdlet. @@ -265,7 +265,7 @@ internal object GetPropertyDynamicParameters( // Parameter validation is done in the session state object return _sessionState.GetPropertyDynamicParameters(path, providerSpecificPickList, context); - } // GetPropertyDynamicParameters + } #endregion GetProperty @@ -314,7 +314,7 @@ public Collection Set( // Parameter validation is done in the session state object return _sessionState.SetProperty(new string[] { path }, propertyValue, false, false); - } // SetProperty + } /// /// Sets the specified properties on the specified item(s) @@ -367,7 +367,7 @@ public Collection Set( // Parameter validation is done in the session state object return _sessionState.SetProperty(path, propertyValue, force, literalPath); - } // SetProperty + } /// /// Sets the specified properties on the specified item(s) @@ -416,7 +416,7 @@ internal void Set( // Parameter validation is done in the session state object _sessionState.SetProperty(new string[] { path }, propertyValue, context); - } // SetProperty + } /// /// Gets the dynamic parameters for the set-itemproperty cmdlet. @@ -463,7 +463,7 @@ internal object SetPropertyDynamicParameters( // Parameter validation is done in the session state object return _sessionState.SetPropertyDynamicParameters(path, propertyValue, context); - } // SetPropertyDynamicParameters + } #endregion SetProperty @@ -509,7 +509,7 @@ public void Clear( // Parameter validation is done in the session state object _sessionState.ClearProperty(new string[] { path }, propertyToClear, false, false); - } // ClearProperty + } /// /// Clear the specified properties from the specified item(s) @@ -559,7 +559,7 @@ public void Clear( // Parameter validation is done in the session state object _sessionState.ClearProperty(path, propertyToClear, force, literalPath); - } // ClearProperty + } /// /// Clears the specified properties from the specified item(s) @@ -605,7 +605,7 @@ internal void Clear( // Parameter validation is done in the session state object _sessionState.ClearProperty(new string[] { path }, propertyToClear, context); - } // ClearProperty + } /// /// Gets the dynamic parameters for the clear-itemproperty cmdlet. @@ -652,7 +652,7 @@ internal object ClearPropertyDynamicParameters( // Parameter validation is done in the session state object return _sessionState.ClearPropertyDynamicParameters(path, propertyToClear, context); - } // ClearPropertyDynamicParameters + } #endregion ClearProperty @@ -710,7 +710,7 @@ public Collection New( // Parameter validation is done in the session state object return _sessionState.NewProperty(new string[] { path }, propertyName, propertyTypeName, value, false, false); - } // NewProperty + } /// /// Creates a new property on the specified item @@ -772,7 +772,7 @@ public Collection New( // Parameter validation is done in the session state object return _sessionState.NewProperty(path, propertyName, propertyTypeName, value, force, literalPath); - } // NewProperty + } /// /// Creates a new property on the specified item @@ -831,7 +831,7 @@ internal void New( // Parameter validation is done in the session state object _sessionState.NewProperty(new string[] { path }, propertyName, type, value, context); - } // NewProperty + } /// /// Gets the dynamic parameters for the new-itemproperty cmdlet. @@ -886,7 +886,7 @@ internal object NewPropertyDynamicParameters( // Parameter validation is done in the session state object return _sessionState.NewPropertyDynamicParameters(path, propertyName, type, value, context); - } // NewPropertyDynamicParameters + } #endregion NewProperty @@ -930,7 +930,7 @@ public void Remove(string path, string propertyName) // Parameter validation is done in the session state object _sessionState.RemoveProperty(new string[] { path }, propertyName, false, false); - } // RemoveProperty + } /// /// Removes a property from the specified item(s) @@ -976,7 +976,7 @@ public void Remove(string[] path, string propertyName, bool force, bool literalP // Parameter validation is done in the session state object _sessionState.RemoveProperty(path, propertyName, force, literalPath); - } // RemoveProperty + } /// /// Removes a property from the specified item(s) @@ -1022,7 +1022,7 @@ internal void Remove( // Parameter validation is done in the session state object _sessionState.RemoveProperty(new string[] { path }, propertyName, context); - } // RemoveProperty + } /// /// Gets the dynamic parameters for the remove-itemproperty cmdlet. @@ -1069,7 +1069,7 @@ internal object RemovePropertyDynamicParameters( // Parameter validation is done in the session state object return _sessionState.RemovePropertyDynamicParameters(path, propertyName, context); - } // RemovePropertyDynamicParameters + } #endregion RemoveProperty @@ -1123,7 +1123,7 @@ public Collection Rename( // Parameter validation is done in the session state object return _sessionState.RenameProperty(new string[] { path }, sourceProperty, destinationProperty, false, false); - } // RenameProperty + } /// /// Renames a property on the specified item(s) @@ -1181,7 +1181,7 @@ public Collection Rename( // Parameter validation is done in the session state object return _sessionState.RenameProperty(path, sourceProperty, destinationProperty, force, literalPath); - } // RenameProperty + } /// /// Renames a property on the specified item(s) @@ -1236,7 +1236,7 @@ internal void Rename( // Parameter validation is done in the session state object _sessionState.RenameProperty(new string[] { path }, sourceProperty, destinationProperty, context); - } // RenameProperty + } /// /// Gets the dynamic parameters for the rename-itemproperty cmdlet. @@ -1287,7 +1287,7 @@ internal object RenamePropertyDynamicParameters( // Parameter validation is done in the session state object return _sessionState.RenamePropertyDynamicParameters(path, sourceProperty, destinationProperty, context); - } // RenamePropertyDynamicParameters + } #endregion RenameProperty @@ -1353,7 +1353,7 @@ public Collection Copy( destinationPath, destinationProperty, false, false); - } // CopyProperty + } /// /// Copies a property on the specified item(s) @@ -1424,7 +1424,7 @@ public Collection Copy( destinationProperty, force, literalPath); - } // CopyProperty + } /// /// Copies a property on the specified item(s) @@ -1490,7 +1490,7 @@ internal void Copy( destinationPath, destinationProperty, context); - } // CopyProperty + } /// /// Gets the dynamic parameters for the copy-itemproperty cmdlet. @@ -1546,7 +1546,7 @@ internal object CopyPropertyDynamicParameters( // Parameter validation is done in the session state object return _sessionState.CopyPropertyDynamicParameters(path, sourceProperty, destinationPath, destinationProperty, context); - } // CopyPropertyDynamicParameters + } #endregion CopyProperty @@ -1616,7 +1616,7 @@ public Collection Move( destinationProperty, false, false); - } // MoveProperty + } /// /// Moves a property on the specified item(s) @@ -1690,7 +1690,7 @@ public Collection Move( destinationProperty, force, literalPath); - } // MoveProperty + } /// /// Moves a property on the specified item(s) @@ -1759,7 +1759,7 @@ internal void Move( destinationPath, destinationProperty, context); - } // MoveProperty + } /// /// Gets the dynamic parameters for the copy-itemproperty cmdlet. @@ -1815,7 +1815,7 @@ internal object MovePropertyDynamicParameters( // Parameter validation is done in the session state object return _sessionState.MovePropertyDynamicParameters(path, sourceProperty, destinationPath, destinationProperty, context); - } // MovePropertyDynamicParameters + } #endregion MoveProperty @@ -1827,6 +1827,6 @@ internal object MovePropertyDynamicParameters( private SessionStateInternal _sessionState; #endregion private data - } // PropertyCmdletProviderIntrinsics + } } diff --git a/src/System.Management.Automation/engine/ProviderInterfaces.cs b/src/System.Management.Automation/engine/ProviderInterfaces.cs index 75738cce485..2662ff67a1b 100644 --- a/src/System.Management.Automation/engine/ProviderInterfaces.cs +++ b/src/System.Management.Automation/engine/ProviderInterfaces.cs @@ -24,7 +24,7 @@ private CmdletProviderManagementIntrinsics() Dbg.Diagnostics.Assert( false, "This constructor should never be called. Only the constructor that takes an instance of SessionState should be called."); - } // CmdletProviderManagementIntrinsics private + } /// /// The facade for managing providers @@ -43,7 +43,7 @@ internal CmdletProviderManagementIntrinsics(SessionStateInternal sessionState) } _sessionState = sessionState; - } // CmdletProviderManagementIntrinsics internal + } #endregion Constructors @@ -74,7 +74,7 @@ public Collection Get(string name) // Parameter validation is done in the session state object return _sessionState.GetProvider(name); - } // Get + } /// /// Gets the specified provider(s). @@ -105,7 +105,7 @@ public ProviderInfo GetOne(string name) // Parameter validation is done in the session state object return _sessionState.GetSingleProvider(name); - } // Get + } /// /// Gets all the Cmdlet Providers that are loaded. @@ -117,7 +117,7 @@ public IEnumerable GetAll() "The only constructor for this class should always set the sessionState field"); return _sessionState.ProviderList; - } // GetAll + } #endregion Public methods @@ -142,7 +142,7 @@ internal static bool CheckProviderCapabilities( // Check the capability return (provider.Capabilities & capability) != 0; - } // CheckProviderCapabilities + } /// /// Gets the count of the number of providers that are loaded @@ -153,7 +153,7 @@ internal int Count { return _sessionState.ProviderCount; } - } // Count + } #endregion Internal methods @@ -162,6 +162,6 @@ internal int Count private SessionStateInternal _sessionState; #endregion private data - } // ProviderIntrinsics + } } diff --git a/src/System.Management.Automation/engine/PseudoParameterBinder.cs b/src/System.Management.Automation/engine/PseudoParameterBinder.cs index 37a2593bd06..cf9f9f7a2e5 100644 --- a/src/System.Management.Automation/engine/PseudoParameterBinder.cs +++ b/src/System.Management.Automation/engine/PseudoParameterBinder.cs @@ -76,7 +76,7 @@ internal RuntimeDefinedParameterBinder( { base.Target = value; } - } // Target + } #region Parameter default values @@ -98,7 +98,7 @@ internal override object GetDefaultParameterValue(string name) result = parameter.Value; } return result; - } // GetDefaultParameterValue + } #endregion Parameter default values @@ -127,8 +127,8 @@ internal override void BindParameter(string name, object value, CompiledCommandP Target[name].Value = value; this.CommandLineParameters.Add(name, value); - } // BindParameter + } #endregion Parameter binding - } // RuntimeDefinedParameterBinder -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/PseudoParameters.cs b/src/System.Management.Automation/engine/PseudoParameters.cs index d847660dd98..616a7c44671 100644 --- a/src/System.Management.Automation/engine/PseudoParameters.cs +++ b/src/System.Management.Automation/engine/PseudoParameters.cs @@ -27,7 +27,7 @@ public class RuntimeDefinedParameter /// public RuntimeDefinedParameter() { - } // RuntimeDefinedParameter + } /// /// Constructs a new instance of a runtime-defined parameter using the specified parameters. @@ -68,7 +68,7 @@ public RuntimeDefinedParameter(string name, Type parameterType, Collection /// Gets or sets the name of the parameter @@ -90,7 +90,7 @@ public string Name } _name = value; } - } // Name + } private string _name = String.Empty; /// diff --git a/src/System.Management.Automation/engine/ReflectionParameterBinder.cs b/src/System.Management.Automation/engine/ReflectionParameterBinder.cs index 6fd939d34c9..87c32b82784 100644 --- a/src/System.Management.Automation/engine/ReflectionParameterBinder.cs +++ b/src/System.Management.Automation/engine/ReflectionParameterBinder.cs @@ -143,7 +143,7 @@ internal override void BindParameter(string name, object value, CompiledCommandP ExtendedTypeSystem.ExceptionWhenSetting, name, e.Message); } - } // BindParameter + } #endregion Parameter binding @@ -295,5 +295,5 @@ private static Expression GetPropertyOrFieldExpr(Type type, string name, Express } #endregion Private members - } // ReflectionParameterBinder -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/ScopedItemSearcher.cs b/src/System.Management.Automation/engine/ScopedItemSearcher.cs index a3462153121..2ef51fc52e0 100644 --- a/src/System.Management.Automation/engine/ScopedItemSearcher.cs +++ b/src/System.Management.Automation/engine/ScopedItemSearcher.cs @@ -235,7 +235,7 @@ private void InitializeScopeEnumerator() private bool _isInitialized; #endregion private members - } // class ScopedItemSearcher + } /// /// The scope searcher for variables @@ -293,7 +293,7 @@ protected override bool GetScopeItem( return result; } - } // VariableScopeItemSearcher + } /// /// The scope searcher for aliases @@ -346,7 +346,7 @@ protected override bool GetScopeItem( return result; } - } // AliasScopeItemSearcher + } /// /// The scope searcher for functions @@ -433,7 +433,7 @@ internal string Name get { return _name; } } private string _name = String.Empty; - } // FunctionScopeItemSearcher + } /// /// The scope searcher for drives @@ -479,5 +479,5 @@ protected override bool GetScopeItem( } return result; } - } // DriveScopeItemSearcher -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/ScriptInfo.cs b/src/System.Management.Automation/engine/ScriptInfo.cs index 55b7f22c9a2..fc052572506 100644 --- a/src/System.Management.Automation/engine/ScriptInfo.cs +++ b/src/System.Management.Automation/engine/ScriptInfo.cs @@ -37,7 +37,7 @@ internal ScriptInfo(string name, ScriptBlock script, ExecutionContext context) } this.ScriptBlock = script; - } // ScriptInfo ctor + } /// /// This is a copy constructor, used primarily for get-command. @@ -122,5 +122,5 @@ internal override CommandMetadata CommandMetadata } } private CommandMetadata _commandMetadata; - } // ScriptInfo -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/SecurityDescriptorCmdletProviderInterfaces.cs b/src/System.Management.Automation/engine/SecurityDescriptorCmdletProviderInterfaces.cs index 4b26bc6b56e..63e27129067 100644 --- a/src/System.Management.Automation/engine/SecurityDescriptorCmdletProviderInterfaces.cs +++ b/src/System.Management.Automation/engine/SecurityDescriptorCmdletProviderInterfaces.cs @@ -22,7 +22,7 @@ private SecurityDescriptorCmdletProviderIntrinsics() Dbg.Diagnostics.Assert( false, "This constructor should never be called. Only the constructor that takes an instance of SessionState should be called."); - } // CmdletProviderIntrinsics private + } /// /// Initializes a new instance of the SecurityDescriptorCmdletProviderIntrinsics @@ -40,7 +40,7 @@ internal SecurityDescriptorCmdletProviderIntrinsics(Cmdlet cmdlet) _cmdlet = cmdlet; _sessionState = cmdlet.Context.EngineSessionState; - } // CmdletProviderIntrinsics internal + } /// /// Initializes a new instance of the SecurityDescriptorCmdletProviderIntrinsics @@ -57,7 +57,7 @@ internal SecurityDescriptorCmdletProviderIntrinsics(SessionStateInternal session } _sessionState = sessionState; - } // CmdletProviderIntrinsics internal + } #endregion Constructors @@ -87,7 +87,7 @@ public Collection Get(string path, AccessControlSections includeSectio // Parameter validation is done in the session state object return _sessionState.GetSecurityDescriptor(path, includeSections); - } // GetSecurityDescriptor + } /// /// Gets the SecurityDescriptor at the specified path, including only the specified @@ -116,7 +116,7 @@ internal void Get(string path, // Parameter validation is done in the session state object _sessionState.GetSecurityDescriptor(path, includeSections, context); - } // GetSecurityDescriptor + } #endregion GetSecurityDescriptor @@ -145,7 +145,7 @@ public Collection Set(string path, ObjectSecurity sd) Collection result = _sessionState.SetSecurityDescriptor(path, sd); return result; - } // SetSecurityDescriptor + } /// /// Sets the SecurityDescriptor at the specified path, using the provided Context. @@ -172,7 +172,7 @@ internal void Set(string path, ObjectSecurity sd, CmdletProviderContext context) // Parameter validation is done in the session state object _sessionState.SetSecurityDescriptor(path, sd, context); - } // SetSecurityDescriptor + } #endregion SetSecurityDescriptor @@ -200,7 +200,7 @@ public ObjectSecurity NewFromPath(string path, AccessControlSections includeSect // Parameter validation is done in the session state object return _sessionState.NewSecurityDescriptorFromPath(path, includeSections); - } // NewSecurityDescriptor + } /// /// Creates a new SecurityDescriptor from the specified provider and of the given type, @@ -230,7 +230,7 @@ public ObjectSecurity NewOfType(string providerId, string type, AccessControlSec return _sessionState.NewSecurityDescriptorOfType(providerId, type, includeSections); - } // NewSecurityDescriptor + } #endregion NewSecurityDescriptor @@ -242,6 +242,6 @@ public ObjectSecurity NewOfType(string providerId, string type, AccessControlSec private SessionStateInternal _sessionState; #endregion private data - } // SecurityDescriptorCmdletProviderIntrinsics + } } diff --git a/src/System.Management.Automation/engine/SessionState.cs b/src/System.Management.Automation/engine/SessionState.cs index ebbbdeef991..90f7d865a01 100644 --- a/src/System.Management.Automation/engine/SessionState.cs +++ b/src/System.Management.Automation/engine/SessionState.cs @@ -166,7 +166,7 @@ internal SessionState PublicSessionState /// internal ProviderIntrinsics InvokeProvider { - get { return _invokeProvider ?? (_invokeProvider = new ProviderIntrinsics(this)); } // get + get { return _invokeProvider ?? (_invokeProvider = new ProviderIntrinsics(this)); } } private ProviderIntrinsics _invokeProvider; @@ -533,5 +533,5 @@ internal ProviderInvocationException NewProviderInvocationException( return pie; } #endregion Errors - } // SessionStateInternal class + } } diff --git a/src/System.Management.Automation/engine/SessionStateAliasAPIs.cs b/src/System.Management.Automation/engine/SessionStateAliasAPIs.cs index 75f354c873b..d4ee3537a77 100644 --- a/src/System.Management.Automation/engine/SessionStateAliasAPIs.cs +++ b/src/System.Management.Automation/engine/SessionStateAliasAPIs.cs @@ -66,7 +66,7 @@ internal IDictionary GetAliasTable() } return result; - } // GetAliasTable + } /// /// Gets an IEnumerable for the alias table for a given scope @@ -104,7 +104,7 @@ internal IDictionary GetAliasTableAtScope(string scopeID) } return result; - } // GetAliasTableAtScope + } /// /// List of aliases to export from this session state object... @@ -162,7 +162,7 @@ internal AliasInfo GetAlias(string aliasName, CommandOrigin origin) } return result; - } // GetAlias + } /// /// Gets the value of the specified alias from the alias table. @@ -222,7 +222,7 @@ internal AliasInfo GetAliasAtScope(string aliasName, string scopeID) } return result; - } // GetAliasAtScope + } /// /// Sets the alias with specified name to the specified value in the current scope. @@ -263,7 +263,7 @@ internal AliasInfo SetAliasValue(string aliasName, string value, bool force, Com AliasInfo info = _currentScope.SetAliasValue(aliasName, value, this.ExecutionContext, force, origin); return info; - } // SetAliasValue + } /// /// Sets the alias with specified name to the specified value in the current scope. @@ -340,7 +340,7 @@ internal AliasInfo SetAliasValue( AliasInfo info = _currentScope.SetAliasValue(aliasName, value, options, this.ExecutionContext, force, origin); return info; - } // SetAliasValue + } /// /// Sets the alias with specified name to the specified value in the current scope. @@ -408,7 +408,7 @@ internal AliasInfo SetAliasItem(AliasInfo alias, bool force, CommandOrigin origi AliasInfo info = _currentScope.SetAliasItem(alias, force, origin); return info; - } // SetAliasItem + } /// /// Sets the alias with specified name to the specified value in the current scope. @@ -465,7 +465,7 @@ internal AliasInfo SetAliasItemAtScope(AliasInfo alias, string scopeID, bool for AliasInfo info = scope.SetAliasItem(alias, force, origin); return info; - } // SetAliasItemAtScope + } /// /// Sets the alias with specified name to the specified value in the current scope. @@ -554,7 +554,7 @@ internal void RemoveAlias(string aliasName, bool force) } } } - } // RemoveAlias + } /// /// Gets the aliases by command name (used by metadata-driven help) @@ -578,6 +578,6 @@ internal IEnumerable GetAliasesByCommandName(string command) } #endregion aliases - } // SessionStateInternal class + } } diff --git a/src/System.Management.Automation/engine/SessionStateCmdletAPIs.cs b/src/System.Management.Automation/engine/SessionStateCmdletAPIs.cs index 06fda01ba09..ac11d3e5aed 100644 --- a/src/System.Management.Automation/engine/SessionStateCmdletAPIs.cs +++ b/src/System.Management.Automation/engine/SessionStateCmdletAPIs.cs @@ -78,7 +78,7 @@ internal CmdletInfo GetCmdlet(string cmdletName, CommandOrigin origin) } return result; - } // GetCmdlet + } /// /// Gets the value of the specified cmdlet from the cmdlet table. @@ -124,7 +124,7 @@ internal CmdletInfo GetCmdletAtScope(string cmdletName, string scopeID) } return result; - } // GetCmdletAtScope + } /// /// Gets an IEnumerable for the cmdlet table @@ -161,7 +161,7 @@ internal IDictionary> GetCmdletTable() } return result; - } // GetCmdletTable + } /// /// Gets an IEnumerable for the cmdlet table for a given scope @@ -203,7 +203,7 @@ internal IDictionary> GetCmdletTableAtScope(string scop } return result; - } // GetCmdletTableAtScope + } internal void RemoveCmdlet(string name, int index, bool force) { @@ -265,7 +265,7 @@ internal void RemoveCmdlet(string name, int index, bool force, CommandOrigin ori } } } - } // RemoveCmdlet + } /// /// Removes a cmdlet entry from the cmdlet table. @@ -316,9 +316,9 @@ internal void RemoveCmdletEntry(string name, bool force) } } } - } // RemoveCmdlet + } #endregion cmdlets - } // SessionStateInternal class + } } diff --git a/src/System.Management.Automation/engine/SessionStateContainer.cs b/src/System.Management.Automation/engine/SessionStateContainer.cs index 3e9dc72812a..7716d423aa6 100644 --- a/src/System.Management.Automation/engine/SessionStateContainer.cs +++ b/src/System.Management.Automation/engine/SessionStateContainer.cs @@ -71,7 +71,7 @@ internal bool ItemExists(string path, bool force, bool literalPath) context.ThrowFirstErrorOrDoNothing(); return result; - } // ItemExists + } /// /// Determines if the monad virtual namespace path exists. @@ -138,7 +138,7 @@ internal bool ItemExists( result = false; } return result; - } // Exists + } /// /// Determines if the item at the specified path exists @@ -210,7 +210,7 @@ internal bool ItemExists( e); } return result; - } // Exists + } /// /// Gets the dynamic parameters for the test-path cmdlet. @@ -277,7 +277,7 @@ internal object ItemExistsDynamicParameters(string path, CmdletProviderContext c return ItemExistsDynamicParameters(providerInstance, providerPaths[0], newContext); } return null; - } // ItemExistsDynamicParameters + } /// /// Gets the dynamic parameters for the test-path cmdlet. @@ -352,7 +352,7 @@ private object ItemExistsDynamicParameters( e); } return result; - } // ITemExistsDynamicParameters + } #endregion Exists @@ -397,7 +397,7 @@ internal bool IsValidPath(string path) context.ThrowFirstErrorOrDoNothing(); return result; - } // IsValidPath + } /// /// Determines if the MSH path is a syntactically and semantically valid path for the provider. @@ -449,7 +449,7 @@ internal bool IsValidPath( ItemCmdletProvider providerInstance = GetItemProviderInstance(provider); return IsValidPath(providerInstance, providerPath, context); - } // IsValidPath + } /// /// Determines if the specified path is valid. @@ -521,7 +521,7 @@ private bool IsValidPath( e); } return result; - } // IsValidPath + } #endregion IsValidPath @@ -566,7 +566,7 @@ internal bool IsItemContainer(string path) context.ThrowFirstErrorOrDoNothing(); return result; - } // IsItemContainer + } /// /// Determines if the monad virtual namespace path is a container. @@ -634,7 +634,7 @@ internal bool IsItemContainer( } return result; - } // IsItemContainer + } /// /// Determines if the item at the specified path is a container. @@ -742,7 +742,7 @@ private bool IsItemContainer( } return result; - } // IsItemContainer + } #endregion IsItemContainer @@ -793,7 +793,7 @@ internal void RemoveItem(string[] paths, bool recurse, bool force, bool literalP RemoveItem(paths, recurse, context); context.ThrowFirstErrorOrDoNothing(); - } // RemoveItem + } /// /// Deletes the specified object @@ -860,7 +860,7 @@ internal void RemoveItem( RemoveItem(providerInstance, providerPath, recurse, context); } } - } // RemoveItem + } /// /// Internal remove item method that just calls the provider directly without globbing. @@ -1005,7 +1005,7 @@ internal void RemoveItem( } } } - } // IsItemContainer + } } else { @@ -1033,7 +1033,7 @@ internal void RemoveItem( path, e); } - } // RemoveItem + } /// /// Gets the dynamic parameters for the remove-item cmdlet. @@ -1103,7 +1103,7 @@ internal object RemoveItemDynamicParameters( return RemoveItemDynamicParameters(providerInstance, providerPaths[0], recurse, newContext); } return null; - } // RemoveItemDynamicParameters + } /// /// Gets the dynamic parameters for the remove-item cmdlet. @@ -1182,7 +1182,7 @@ private object RemoveItemDynamicParameters( e); } return result; - } // RemoveItemDynamicParameters + } #endregion RemoveItem @@ -1252,7 +1252,7 @@ internal Collection GetChildItems(string[] paths, bool recurse, uint d context.ThrowFirstErrorOrDoNothing(); return context.GetAccumulatedObjects(); - } // GetChildItems + } /// /// Gets the children of the specified item. @@ -1521,7 +1521,7 @@ internal void GetChildItems( throw pathNotFound; } } - } // GetChildItems + } /// /// Gets the child items of the item at the specified path. @@ -1598,7 +1598,7 @@ private void GetChildItems( path, e); } - } // GetChildItems + } /// /// Determines if the item at the specified path is a container. @@ -1641,7 +1641,7 @@ private bool IsPathContainer( } return itemContainer; - } // IsPathContainer + } /// /// Since we can't do include and exclude filtering on items we have to @@ -1690,7 +1690,7 @@ private void ProcessPathItems( { // Call ProcessPathItems with 'depth' set to maximum value for infinite recursion when needed. ProcessPathItems(providerInstance, path, recurse, uint.MaxValue, context, out childrenNotMatchingFilterCriteria, processMode, skipIsItemContainerCheck); - } // ProcessPathItems + } /// /// Since we can't do include and exclude filtering on items we have to @@ -1903,7 +1903,7 @@ private void ProcessPathItems( // The item is a container so recurse into it. ProcessPathItems(providerInstance, qualifiedPath, recurse, depth - 1, context, out childrenNotMatchingFilterCriteria, processMode, skipIsItemContainerCheck: true); } - } // for each childName + } } else { @@ -1941,7 +1941,7 @@ private void ProcessPathItems( } } } - } // ProcessPathItems + } /// /// Gets the dynamic parameters for the get-childitem cmdlet. @@ -2052,7 +2052,7 @@ internal object GetChildItemsDynamicParameters( } return null; - } // GetChildItemsDynamicParameters + } // Detect if the GetChildItemDynamicParameters has been overridden. private bool HasGetChildItemDynamicParameters(ProviderInfo providerInfo) @@ -2153,7 +2153,7 @@ private object GetChildItemsDynamicParameters( e); } return result; - } // GetChildItemsDynamicParameters + } #endregion GetChildItems @@ -2249,7 +2249,7 @@ internal Collection GetChildNames( } return results; - } // GetChildNames + } /// /// Gets names of the children of the specified path. @@ -2482,7 +2482,7 @@ internal void GetChildNames( context); } } - } // GetChildNames + } /// /// Gets the child names of the item at the specified path by @@ -2671,15 +2671,15 @@ private void DoGetChildNamesManually( true, depth - 1); } - } // foreach - } // if - } // recurse + } + } + } } finally { childNamesContext.RemoveStopReferral(); } - } // DoGetChildNamesRecurseManually + } /// /// Gets the names of the children of the item at the specified path. @@ -2753,7 +2753,7 @@ private void GetChildNames( path, e); } - } // GetChildNames + } /// /// Gets the dynamic parameters for the get-childitem -name cmdlet. @@ -2850,7 +2850,7 @@ internal object GetChildNamesDynamicParameters( } } return result; - } // GetChildNamesDynamicParameters + } /// /// Gets the dynamic parameters for the get-childitem -names cmdlet. @@ -2926,7 +2926,7 @@ private object GetChildNamesDynamicParameters( e); } return result; - } // GetChildNamesDynamicParameters + } #endregion GetChildNames @@ -2981,7 +2981,7 @@ internal Collection RenameItem(string path, string newName, bool force // Since there was no errors return the accumulated objects return context.GetAccumulatedObjects(); - } // RenameItem + } /// /// Renames the item at the specified path to the new name provided. @@ -3061,7 +3061,7 @@ internal void RenameItem( ErrorCategory.InvalidArgument, providerPaths)); } - } // RenameItem + } /// /// Renames the item at the specified path. @@ -3134,7 +3134,7 @@ private void RenameItem( path, e); } - } // RenameItem + } /// /// Gets the dynamic parameters for the rename-item cmdlet. @@ -3205,7 +3205,7 @@ internal object RenameItemDynamicParameters( return RenameItemDynamicParameters(providerInstance, providerPaths[0], newName, newContext); } return null; - } // RenameItemDynamicParameters + } /// /// Gets the dynamic parameters for the rename-item cmdlet. @@ -3285,7 +3285,7 @@ private object RenameItemDynamicParameters( e); } return result; - } // RenameItemDynamicParameters + } #endregion RenameItem @@ -3344,7 +3344,7 @@ internal Collection NewItem(string[] paths, string name, string type, // Since there was no errors return the accumulated objects return context.GetAccumulatedObjects(); - } // NewItem + } /// /// Creates a new item at the specified path. @@ -3528,7 +3528,7 @@ internal void NewItem( NewItemPrivate(providerInstance, composedPath, type, content, context); } } - } // NewItem + } /// /// Creates a new item at the specified path. @@ -3601,7 +3601,7 @@ private void NewItemPrivate( path, e); } - } // NewItem + } /// /// Gets the dynamic parameters for the new-item cmdlet. @@ -3675,7 +3675,7 @@ internal object NewItemDynamicParameters( return NewItemDynamicParameters(providerInstance, providerPaths[0], type, newItemValue, newContext); } return null; - } // NewItemDynamicParameters + } /// /// Gets the dynamic parameters for the new-item cmdlet. @@ -3758,7 +3758,7 @@ private object NewItemDynamicParameters( e); } return result; - } // NewItemDynamicParameters + } #endregion NewItem @@ -3811,7 +3811,7 @@ internal bool HasChildItems(string path, bool force, bool literalPath) context.ThrowFirstErrorOrDoNothing(); return result; - } // HasChildItems + } /// /// Determines if the item at the specified path has children. @@ -3876,7 +3876,7 @@ internal bool HasChildItems( } return result; - } // HasChildItems + } /// /// Determines if the item at the specified path has children. @@ -4022,7 +4022,7 @@ private bool HasChildItems( } return result; - } // HasChildItems + } #endregion HasChildItems @@ -4094,7 +4094,7 @@ internal Collection CopyItem(string[] paths, context.ThrowFirstErrorOrDoNothing(); return context.GetAccumulatedObjects(); - } // CopyItem + } /// /// Copies an item at the specified path to an item at the . @@ -4416,7 +4416,7 @@ internal void CopyItem( } } } - } // CopyItem + } /// /// Copies the specified item(s) to the specified destination @@ -4493,7 +4493,7 @@ private void CopyItem( path, e); } - } // CopyItem + } /// /// Recursively copies many items to a single container @@ -4569,7 +4569,7 @@ private void CopyRecurseToSingleContainer( CopyItem(containerProviderInstance, childPath, destinationPath, false, context); } - } // CopyRecurseToSingleContainer + } /// /// Gets the dynamic parameters for the copy-item cmdlet. @@ -4679,7 +4679,7 @@ internal object CopyItemDynamicParameters( } return null; - } // CopyItemDynamicParameters + } /// /// Gets the dynamic parameters for the copy-item cmdlet. @@ -4762,7 +4762,7 @@ private object CopyItemDynamicParameters( e); } return result; - } // CopyItemDynamicParameters + } // This function validates a remote path, and if it exists, it returns the root path. // diff --git a/src/System.Management.Automation/engine/SessionStateContent.cs b/src/System.Management.Automation/engine/SessionStateContent.cs index 37bff16ef45..3b2578071c9 100644 --- a/src/System.Management.Automation/engine/SessionStateContent.cs +++ b/src/System.Management.Automation/engine/SessionStateContent.cs @@ -66,7 +66,7 @@ internal Collection GetContentReader(string[] paths, bool force, context.ThrowFirstErrorOrDoNothing(); return results; - } // GetContentReader + } /// /// Gets the content reader for the specified item. @@ -143,7 +143,7 @@ internal Collection GetContentReader( } return results; - } // GetContentReader + } /// /// Gets the content reader for the item at the specified path. @@ -216,7 +216,7 @@ private IContentReader GetContentReaderPrivate( e); } return result; - } // GetContentReaderPrivate + } /// /// Gets the dynamic parameters for the get-content cmdlet. @@ -276,7 +276,7 @@ internal object GetContentReaderDynamicParameters( out providerInstance); return GetContentReaderDynamicParameters(providerInstance, path, newContext); - } // GetContentReaderDynamicParameters + } /// /// Gets the dynamic parameters for the get-content cmdlet. @@ -352,7 +352,7 @@ private object GetContentReaderDynamicParameters( e); } return result; - } // GetContentReaderDynamicParameters + } #endregion GetContentReader @@ -405,7 +405,7 @@ internal Collection GetContentWriter(string[] paths, bool force, context.ThrowFirstErrorOrDoNothing(); return results; - } // GetContentWriter + } /// /// Gets the content writer for the specified item. @@ -480,7 +480,7 @@ internal Collection GetContentWriter( } return results; - } // GetContentWriter + } /// /// Gets the content writer for the item at the specified path. @@ -552,7 +552,7 @@ private IContentWriter GetContentWriterPrivate( e); } return result; - } // GetContentWriterPrivate + } /// /// Gets the dynamic parameters for the set-content and add-content cmdlet. @@ -618,7 +618,7 @@ internal object GetContentWriterDynamicParameters( return GetContentWriterDynamicParameters(providerInstance, providerPaths[0], newContext); } return null; - } // GetContentWriterDynamicParameters + } /// /// Gets the dynamic parameters for the set-content and add-content cmdlet. @@ -694,7 +694,7 @@ private object GetContentWriterDynamicParameters( e); } return result; - } // GetContentWriterDynamicParameters + } #endregion GetContentWriter @@ -742,7 +742,7 @@ internal void ClearContent(string[] paths, bool force, bool literalPath) ClearContent(paths, context); context.ThrowFirstErrorOrDoNothing(); - } // ClearContent + } /// /// Clears all of the content from the specified item. @@ -805,7 +805,7 @@ internal void ClearContent( ClearContentPrivate(providerInstance, providerPath, context); } } - } // ClearContent + } /// /// Clears the content from the item at the specified path. @@ -875,7 +875,7 @@ private void ClearContentPrivate( path, e); } - } // ClearContentPrivate + } /// /// Gets the dynamic parameters for the clear-content cmdlet. @@ -941,7 +941,7 @@ internal object ClearContentDynamicParameters( return ClearContentDynamicParameters(providerInstance, providerPaths[0], newContext); } return null; - } // ClearContentDynamicParameters + } /// /// Calls the provider to get the clear-content dynamic parameters @@ -1016,7 +1016,7 @@ private object ClearContentDynamicParameters( e); } return result; - } // ClearContentDynamicParameters + } #endregion ClearContent diff --git a/src/System.Management.Automation/engine/SessionStateDriveAPIs.cs b/src/System.Management.Automation/engine/SessionStateDriveAPIs.cs index c44e6348710..69dfc55a581 100644 --- a/src/System.Management.Automation/engine/SessionStateDriveAPIs.cs +++ b/src/System.Management.Automation/engine/SessionStateDriveAPIs.cs @@ -95,7 +95,7 @@ internal PSDriveInfo NewDrive(PSDriveInfo drive, string scopeID) } return result; - } // NewDrive + } /// /// Adds a drive to the PowerShell namespace. @@ -226,7 +226,7 @@ internal void NewDrive(PSDriveInfo drive, string scopeID, CmdletProviderContext throw e; } - } // NewDrive + } private static bool IsValidDriveName(string name) { @@ -248,7 +248,7 @@ private static bool IsValidDriveName(string name) } while (false); return result; - } // IsValidDriveName + } private static char[] s_charactersInvalidInDriveName = new char[] { ':', '/', '\\', '.', '~' }; /// @@ -350,7 +350,7 @@ private string GetProviderRootFromSpecifiedRoot(string root, ProviderInfo provid } return result; - } // GetProviderRootFromSpecifiedRoot + } /// /// Gets an object that defines the additional parameters for the NewDrive implementation @@ -399,7 +399,7 @@ internal object NewDriveDynamicParameters(string providerId, CmdletProviderConte e); } return result; - } // NewDriveDynamicParameters + } #endregion NewDrive @@ -466,7 +466,7 @@ private PSDriveInfo GetDrive(string name, bool automount) // Increment the scope ID ++scopeID; - } // foreach scope + } if (result == null && automount) { @@ -491,7 +491,7 @@ private PSDriveInfo GetDrive(string name, bool automount) } return result; - } // GetDrive + } /// /// Searches through the session state scopes looking @@ -594,7 +594,7 @@ internal PSDriveInfo GetDrive(string name, string scopeID) } return result; - } // GetDrive + } private PSDriveInfo AutomountFileSystemDrive(string name) { @@ -632,7 +632,7 @@ private PSDriveInfo AutomountFileSystemDrive(string name) } } return result; - } // AutomountFileSystemDrive + } private PSDriveInfo AutomountFileSystemDrive(System.IO.DriveInfo systemDriveInfo) { @@ -734,7 +734,7 @@ private PSDriveInfo AutomountFileSystemDrive(System.IO.DriveInfo systemDriveInfo Severity.Warning); } return result; - } // AutomountFileSystemDrive + } /// /// Auto-mounts a built-in drive. @@ -747,7 +747,7 @@ internal PSDriveInfo AutomountBuiltInDrive(string name) PSDriveInfo result = GetDrive(name, false); return result; - } // AutomountFileSystemDrive + } /// /// Automatically mount the specified drive @@ -878,7 +878,7 @@ private bool ValidateOrRemoveAutoMountedDrive(PSDriveInfo drive, SessionStateSco } return result; - } // ValidateOrRemoveAutoMountedDrive + } /// /// If a VHD is mounted to a drive prior to the PowerShell session being launched, @@ -965,7 +965,7 @@ internal Collection GetDrivesForProvider(string providerId) } return drives; - } // GetDrivesForProvider + } #endregion GetDrive @@ -1004,7 +1004,7 @@ internal void RemoveDrive(string driveName, bool force, string scopeID) } RemoveDrive(drive, force, scopeID); - } // RemoveDrive + } /// /// Removes the drive with the specified name. @@ -1053,7 +1053,7 @@ internal void RemoveDrive( { RemoveDrive(drive, force, scopeID, context); } - } // RemoveDrive + } /// /// Removes the specified drive. @@ -1085,7 +1085,7 @@ internal void RemoveDrive(PSDriveInfo drive, bool force, string scopeID) { context.ThrowFirstErrorOrDoNothing(); } - } // RemoveDrive + } /// /// Removes the specified drive. @@ -1210,7 +1210,7 @@ internal void RemoveDrive( e.ErrorRecord, e)); } - } // RemoveDrive + } /// /// Determines if the drive can be removed by calling the provider @@ -1296,7 +1296,7 @@ private bool CanRemoveDrive(PSDriveInfo drive, CmdletProviderContext context) } return driveRemovable; - } // CanRemoveDrive + } #endregion RemoveDrive @@ -1377,7 +1377,7 @@ internal Collection Drives(string scope) { break; } - } // foreach scope + } // Now lookup all the file system drives and automount any that are not // present @@ -1416,7 +1416,7 @@ internal Collection Drives(string scope) results.Add(drive); } return results; - } // Drives + } #endregion Drives @@ -1431,7 +1431,7 @@ internal PSDriveInfo CurrentDrive return ExecutionContext.TopLevelSessionState.CurrentDrive; else return _currentDrive; - } // get + } set { @@ -1439,8 +1439,8 @@ internal PSDriveInfo CurrentDrive ExecutionContext.TopLevelSessionState.CurrentDrive = value; else _currentDrive = value; - } // set - } // CurrentDrive + } + } } // SessionStateInternal class } diff --git a/src/System.Management.Automation/engine/SessionStateDynamicProperty.cs b/src/System.Management.Automation/engine/SessionStateDynamicProperty.cs index 13a05bbe53f..234255734f3 100644 --- a/src/System.Management.Automation/engine/SessionStateDynamicProperty.cs +++ b/src/System.Management.Automation/engine/SessionStateDynamicProperty.cs @@ -88,7 +88,7 @@ internal Collection NewProperty( Collection results = context.GetAccumulatedObjects(); return results; - } // NewProperty + } /// /// Creates a new property on the specified item @@ -171,7 +171,7 @@ internal void NewProperty( NewProperty(providerInstance, providerPath, property, type, value, context); } } - } // NewProperty + } /// /// Creates a new property on the item at the specified path. @@ -257,7 +257,7 @@ private void NewProperty( path, e); } - } // NewProperty + } /// /// Gets the dynamic parameters for the new-itemproperty cmdlet. @@ -335,7 +335,7 @@ internal object NewPropertyDynamicParameters( return NewPropertyDynamicParameters(providerInstance, providerPaths[0], propertyName, type, value, newContext); } return null; - } // NewPropertyDynamicParameters + } /// /// Gets the dynamic parameters for the new-itemproperty cmdlet. @@ -423,7 +423,7 @@ private object NewPropertyDynamicParameters( e); } return result; - } // NewPropertyDynamicParameters + } #endregion NewProperty @@ -479,7 +479,7 @@ internal void RemoveProperty(string[] paths, string property, bool force, bool l RemoveProperty(paths, property, context); context.ThrowFirstErrorOrDoNothing(); - } // RemoveProperty + } /// /// Removes the specified properties from the specified item. @@ -551,7 +551,7 @@ internal void RemoveProperty( RemoveProperty(providerInstance, providerPath, property, context); } } - } // RemoveProperty + } /// /// Removes the property from the item at the specified path. @@ -629,7 +629,7 @@ private void RemoveProperty( path, e); } - } // RemoveProperty + } /// /// Gets the dynamic parameters for the remove-itemproperty cmdlet. @@ -699,7 +699,7 @@ internal object RemovePropertyDynamicParameters( return RemovePropertyDynamicParameters(providerInstance, providerPaths[0], propertyName, newContext); } return null; - } // RemovePropertyDynamicParameters + } /// /// Gets the dynamic parameters for the remove-itemproperty cmdlet. @@ -779,7 +779,7 @@ private object RemovePropertyDynamicParameters( e); } return result; - } // RemovePropertyDynamicParameters + } #endregion RemoveProperty @@ -864,7 +864,7 @@ internal Collection CopyProperty( Collection results = context.GetAccumulatedObjects(); return results; - } // CopyProperty + } /// /// Copies the specified property on the specified item to the specified property @@ -990,7 +990,7 @@ internal void CopyProperty( } } } - } // CopyProperty + } /// /// Copies the property @@ -1084,7 +1084,7 @@ private void CopyProperty( sourcePath, e); } - } // CopyProperty + } /// /// Gets the dynamic parameters for the copy-itemproperty cmdlet. @@ -1168,7 +1168,7 @@ internal object CopyPropertyDynamicParameters( newContext); } return null; - } // CopyPropertyDynamicParameters + } /// /// Gets the dynamic parameters for the copy-itemproperty cmdlet. @@ -1261,7 +1261,7 @@ private object CopyPropertyDynamicParameters( e); } return result; - } // CopyPropertyDynamicParameters + } #endregion CopyProperty @@ -1349,7 +1349,7 @@ internal Collection MoveProperty( Collection results = context.GetAccumulatedObjects(); return results; - } // MoveProperty + } /// /// Moves the specified property on the specified item to the specified property @@ -1474,7 +1474,7 @@ internal void MoveProperty( } } } - } // MoveProperty + } /// /// Moves the property from one item to another @@ -1568,7 +1568,7 @@ private void MoveProperty( sourcePath, e); } - } // MoveProperty + } /// /// Gets the dynamic parameters for the move-itemproperty cmdlet. @@ -1652,7 +1652,7 @@ internal object MovePropertyDynamicParameters( newContext); } return null; - } // MovePropertyDynamicParameters + } /// /// Gets the dynamic parameters for the move-itemproperty cmdlet. @@ -1746,7 +1746,7 @@ private object MovePropertyDynamicParameters( e); } return result; - } // MovePropertyDynamicParameters + } #endregion MoveProperty @@ -1819,7 +1819,7 @@ internal Collection RenameProperty( Collection results = context.GetAccumulatedObjects(); return results; - } // RenameProperty + } /// /// Renames the specified property on the specified item to the specified property. @@ -1901,7 +1901,7 @@ internal void RenameProperty( RenameProperty(providerInstance, providerPath, sourceProperty, destinationProperty, context); } } - } // RenameProperty + } /// /// Renames the property of the item at the specified path. @@ -1987,7 +1987,7 @@ private void RenameProperty( sourcePath, e); } - } // RenameProperty + } /// /// Gets the dynamic parameters for the rename-itemproperty cmdlet. @@ -2066,7 +2066,7 @@ internal object RenamePropertyDynamicParameters( newContext); } return null; - } // RenamePropertyDynamicParameters + } /// /// Gets the dynamic parameters for the rename-itemproperty cmdlet. @@ -2154,7 +2154,7 @@ private object RenamePropertyDynamicParameters( e); } return result; - } // RenamePropertyDynamicParameters + } #endregion RenameProperty diff --git a/src/System.Management.Automation/engine/SessionStateFunctionAPIs.cs b/src/System.Management.Automation/engine/SessionStateFunctionAPIs.cs index 1dcf2f143fa..0d16ede8064 100644 --- a/src/System.Management.Automation/engine/SessionStateFunctionAPIs.cs +++ b/src/System.Management.Automation/engine/SessionStateFunctionAPIs.cs @@ -58,7 +58,7 @@ internal IDictionary GetFunctionTable() } return result; - } // GetFunctionTable + } /// /// Gets an IEnumerable for the function table for a given scope @@ -96,7 +96,7 @@ internal IDictionary GetFunctionTableAtScope(string scopeI } return result; - } // GetFunctionTableAtScope + } /// /// List of functions/filters to export from this session state object... @@ -167,7 +167,7 @@ internal FunctionInfo GetFunction(string name, CommandOrigin origin) } return (IsFunctionVisibleInDebugger(result, origin)) ? result : null; - } // GetFunction + } private bool IsFunctionVisibleInDebugger(FunctionInfo fnInfo, CommandOrigin origin) { @@ -215,7 +215,7 @@ private bool IsFunctionVisibleInDebugger(FunctionInfo fnInfo, CommandOrigin orig internal FunctionInfo GetFunction(string name) { return GetFunction(name, CommandOrigin.Internal); - } // GetFunction + } private IEnumerable GetFunctionAliases(IParameterMetadataProvider ipmp) { @@ -312,7 +312,7 @@ internal FunctionInfo SetFunctionRaw( } return functionInfo; - } // SetFunctionRaw + } /// /// Set a function in the current scope of session state. @@ -353,7 +353,7 @@ internal FunctionInfo SetFunction( CommandOrigin origin) { return SetFunction(name, function, originalFunction, options, force, origin, ExecutionContext, null); - } // SetFunction + } /// /// Set a function in the current scope of session state. @@ -398,7 +398,7 @@ internal FunctionInfo SetFunction( string helpFile) { return SetFunction(name, function, originalFunction, options, force, origin, ExecutionContext, helpFile, false); - } // SetFunction + } /// /// Set a function in the current scope of session state. @@ -447,7 +447,7 @@ internal FunctionInfo SetFunction( string helpFile) { return SetFunction(name, function, originalFunction, options, force, origin, context, helpFile, false); - } // SetFunction + } /// /// Set a function in the current scope of session state. @@ -539,7 +539,7 @@ internal FunctionInfo SetFunction( origin); return searcher.InitialScope.SetFunction(name, function, originalFunction, options, force, origin, context, helpFile); - } // SetFunction + } /// /// Set a function in the current scope of session state. @@ -727,7 +727,7 @@ internal void RemoveFunction(string name, bool force, CommandOrigin origin) scope = searcher.CurrentLookupScope; } scope.RemoveFunction(name, force); - } // RemoveFunction + } /// /// Removes a function from the function table. @@ -778,5 +778,5 @@ internal void RemoveFunction(string name, PSModuleInfo module) } #endregion Functions - } // SessionStateInternal class + } } diff --git a/src/System.Management.Automation/engine/SessionStateItem.cs b/src/System.Management.Automation/engine/SessionStateItem.cs index ba6f211978e..39287673fef 100644 --- a/src/System.Management.Automation/engine/SessionStateItem.cs +++ b/src/System.Management.Automation/engine/SessionStateItem.cs @@ -71,7 +71,7 @@ internal Collection GetItem(string[] paths, bool force, bool literalPa Collection results = context.GetAccumulatedObjects(); return results; - } // GetItem + } /// /// Gets the specified object @@ -139,7 +139,7 @@ internal void GetItem( GetItemPrivate(providerInstance, providerPath, context); } } - } // GetItem + } /// /// Gets the item at the specified path. @@ -208,7 +208,7 @@ private void GetItemPrivate( path, e); } - } // GetItem + } /// /// Gets the dynamic parameters for the get-item cmdlet. @@ -272,7 +272,7 @@ internal object GetItemDynamicParameters(string path, CmdletProviderContext cont return GetItemDynamicParameters(providerInstance, providerPaths[0], newContext); } return null; - } // GetItemDynamicParameters + } /// /// Gets the dynamic parameters for the get-item cmdlet. @@ -347,7 +347,7 @@ private object GetItemDynamicParameters( e); } return result; - } // GetItemDynamicParameters + } #endregion GetItem @@ -406,7 +406,7 @@ internal Collection SetItem(string[] paths, object value, bool force, // Since there was no errors return the accumulated objects return context.GetAccumulatedObjects(); - } // SetItem + } /// /// Sets the specified object to the specified value @@ -477,7 +477,7 @@ internal void SetItem( } } } - } // SetItem + } /// /// Sets item at the specified path. @@ -550,7 +550,7 @@ private void SetItem( path, e); } - } // SetItem + } /// /// Gets the dynamic parameters for the set-item cmdlet. @@ -617,7 +617,7 @@ internal object SetItemDynamicParameters(string path, object value, CmdletProvid return SetItemDynamicParameters(providerInstance, providerPaths[0], value, newContext); } return null; - } // SetItemDynamicParameters + } /// /// Gets the dynamic parameters for the set-item cmdlet. @@ -696,7 +696,7 @@ private object SetItemDynamicParameters( e); } return result; - } // SetItemDynamicParameters + } #endregion SetItem @@ -755,7 +755,7 @@ internal Collection ClearItem(string[] paths, bool force, bool literal context.ThrowFirstErrorOrDoNothing(); return context.GetAccumulatedObjects(); - } // ClearItem + } /// /// Clears the specified item. Depending on the provider that the path @@ -824,7 +824,7 @@ internal void ClearItem( } } } - } // ClearItem + } /// /// Clears the item at the specified path. @@ -893,7 +893,7 @@ private void ClearItemPrivate( path, e); } - } // ClearItem + } /// /// Gets the dynamic parameters for the clear-item cmdlet. @@ -957,7 +957,7 @@ internal object ClearItemDynamicParameters(string path, CmdletProviderContext co return ClearItemDynamicParameters(providerInstance, providerPaths[0], newContext); } return null; - } // ClearItemDynamicParameters + } /// /// Gets the dynamic parameters for the clear-item cmdlet. @@ -1032,7 +1032,7 @@ private object ClearItemDynamicParameters( e); } return result; - } // ClearItemDynamicParameters + } #endregion ClearItem @@ -1081,7 +1081,7 @@ internal void InvokeDefaultAction(string[] paths, bool literalPath) InvokeDefaultAction(paths, context); context.ThrowFirstErrorOrDoNothing(); - } // InvokeDefaultAction + } /// /// Performs the default action on the specified item. The default action @@ -1149,7 +1149,7 @@ internal void InvokeDefaultAction( } } } - } // InvokeDefaultAction + } /// /// Invokes the default action on the item at the specified path. @@ -1218,7 +1218,7 @@ private void InvokeDefaultActionPrivate( path, e); } - } // InvokeDefaultAction + } /// /// Gets the dynamic parameters for the invoke-item cmdlet. @@ -1282,7 +1282,7 @@ internal object InvokeDefaultActionDynamicParameters(string path, CmdletProvider return InvokeDefaultActionDynamicParameters(providerInstance, providerPaths[0], newContext); } return null; - } // InvokeDefaultActionDynamicParameters + } /// /// Gets the dynamic parameters for the invoke-item cmdlet. @@ -1357,7 +1357,7 @@ private object InvokeDefaultActionDynamicParameters( e); } return result; - } // InvokeDefaultActionDynamicParameters + } #endregion InvokeDefaultAction diff --git a/src/System.Management.Automation/engine/SessionStateLocationAPIs.cs b/src/System.Management.Automation/engine/SessionStateLocationAPIs.cs index e9fa884603b..0d324996a34 100644 --- a/src/System.Management.Automation/engine/SessionStateLocationAPIs.cs +++ b/src/System.Management.Automation/engine/SessionStateLocationAPIs.cs @@ -47,8 +47,8 @@ internal PathInfo CurrentLocation new SessionState(this)); return result; - } // get - } // CurrentLocation + } + } /// /// Gets the namespace specific path of the current working directory @@ -123,7 +123,7 @@ internal PathInfo GetNamespaceCurrentLocation(string namespaceID) path = LocationGlobber.GetDriveQualifiedPath(drive.CurrentLocation, drive); } return new PathInfo(drive, drive.Provider, path, new SessionState(this)); - } // GetNamespaceCurrentLocation + } /// /// Changes the current working directory to the path specified. @@ -155,7 +155,7 @@ internal PathInfo GetNamespaceCurrentLocation(string namespaceID) internal PathInfo SetLocation(string path) { return SetLocation(path, null); - } // SetLocation + } /// /// Changes the current working directory to the path specified @@ -587,7 +587,7 @@ internal PathInfo SetLocation(string path, CmdletProviderContext context, bool l } return this.CurrentLocation; - } // SetLocation + } /// /// Determines if the specified path is the current working directory @@ -784,7 +784,7 @@ CmdletProviderContext normalizePathContext } return result; - } // IsCurrentLocationOrAncestor + } #endregion Current working directory/drive @@ -1016,7 +1016,7 @@ internal PathInfoStack LocationStack(string stackName) PathInfoStack result = new PathInfoStack(stackName, locationStack); return result; - } // LocationStack + } /// /// Sets the default stack ID to the specified stack ID @@ -1064,7 +1064,7 @@ internal PathInfoStack SetDefaultLocationStack(string stackName) return new PathInfoStack(_defaultStackName, locationStack); } return null; - } // SetDefaultLocationStack + } #endregion push-Pop current working directory } // SessionStateInternal class diff --git a/src/System.Management.Automation/engine/SessionStateNavigation.cs b/src/System.Management.Automation/engine/SessionStateNavigation.cs index c0d9a102744..fba99d19b71 100644 --- a/src/System.Management.Automation/engine/SessionStateNavigation.cs +++ b/src/System.Management.Automation/engine/SessionStateNavigation.cs @@ -187,7 +187,7 @@ internal string GetParentPath( { getProviderPathContext.RemoveStopReferral(); } - } // GetParentPath + } private string AddQualifier(string path, ProviderInfo provider, string qualifier, bool isProviderQualified, bool isDriveQualified) { @@ -286,7 +286,7 @@ private string RemoveQualifier(string path, ProviderInfo provider, out string qu } return result; - } // RemoveQualifier + } /// /// Gets the path to the parent object for the given object @@ -431,7 +431,7 @@ internal string GetParentPath( e); } return result; - } // GetParentPath + } #endregion GetParentPath @@ -630,7 +630,7 @@ internal string NormalizeRelativePath( { getProviderPathContext.RemoveStopReferral(); } - } // NormalizeRelativePath + } /// /// Tests the specified character for equality with one of the powershell path separators and @@ -733,7 +733,7 @@ internal string NormalizeRelativePath( } return path; - } // NormalizeRelativePath + } #endregion NormalizeRelativePath @@ -773,7 +773,7 @@ internal string MakePath( CmdletProviderContext context = new CmdletProviderContext(this.ExecutionContext); return MakePath(parent, child, context); - } // MakePath + } /// /// Generates a path from the given parts. @@ -868,7 +868,7 @@ internal string MakePath( result = MakePath(provider, parent, child, context); } return result; - } // MakePath + } /// /// Uses the specified provider to put the two parts of a path together @@ -1005,7 +1005,7 @@ internal string MakePath( } return result; - } // MakePath + } #endregion MakePath @@ -1050,7 +1050,7 @@ internal string GetChildName(string path) context.ThrowFirstErrorOrDoNothing(); return result; - } // GetChildName + } /// /// Gets the name of the leaf element in the specified path. @@ -1155,7 +1155,7 @@ internal string GetChildName( } return GetChildName(provider, workingPath, context); - } // GetChildName + } /// /// Gets the leaf element of the specified path. @@ -1280,7 +1280,7 @@ bool acceptNonContainerProviders e); } return result; - } // GetChildName + } #endregion GetChildName @@ -1347,7 +1347,7 @@ internal Collection MoveItem(string[] paths, string destination, bool // Since there was no errors return the accumulated objects return context.GetAccumulatedObjects(); - } // MoveItem + } /// /// Moves the item specified by path to the specified destination. @@ -1504,7 +1504,7 @@ internal void MoveItem( } } } - } // MoveItem + } /// /// Moves the item at the specified path to the destination path @@ -1577,7 +1577,7 @@ private void MoveItemPrivate( path, e); } - } // MoveItem + } /// /// Gets the dynamic parameters for the move-item cmdlet. @@ -1647,7 +1647,7 @@ internal object MoveItemDynamicParameters( return MoveItemDynamicParameters(providerInstance, providerPaths[0], destination, newContext); } return null; - } // MoveItemDynamicParameters + } /// /// Gets the dynamic parameters for the move-item cmdlet. @@ -1731,7 +1731,7 @@ private object MoveItemDynamicParameters( e); } return result; - } // MoveItemDynamicParameters + } #endregion MoveItem diff --git a/src/System.Management.Automation/engine/SessionStateProperty.cs b/src/System.Management.Automation/engine/SessionStateProperty.cs index 8effe8ae300..fcf4ebc195c 100644 --- a/src/System.Management.Automation/engine/SessionStateProperty.cs +++ b/src/System.Management.Automation/engine/SessionStateProperty.cs @@ -70,7 +70,7 @@ internal Collection GetProperty( Collection results = context.GetAccumulatedObjects(); return results; - } // GetProperties + } /// /// Gets the specified properties from the specified item. @@ -145,7 +145,7 @@ internal void GetProperty( context); } } - } // GetProperty + } /// /// Gets the property from the item at the specified path. @@ -219,7 +219,7 @@ private void GetPropertyPrivate( path, e); } - } // GetPropertyPrivate + } /// /// Gets the dynamic parameters for the get-itemproperty cmdlet. @@ -289,7 +289,7 @@ internal object GetPropertyDynamicParameters( return GetPropertyDynamicParameters(providerInstance, providerPaths[0], providerSpecificPickList, newContext); } return null; - } // GetPropertyDynamicParameters + } /// /// Gets the dynamic parameters for the get-itemproperty cmdlet. @@ -369,7 +369,7 @@ private object GetPropertyDynamicParameters( e); } return result; - } // GetPropertyDynamicParameters + } #endregion GetProperty @@ -432,7 +432,7 @@ internal Collection SetProperty(string[] paths, PSObject property, boo Collection results = context.GetAccumulatedObjects(); return results; - } // SetProperty + } /// /// Sets the specified properties on specified item. @@ -511,7 +511,7 @@ internal void SetProperty( } } } - } // SetProperty + } /// /// Sets the property of the item at the specified path. @@ -589,7 +589,7 @@ private void SetPropertyPrivate( path, e); } - } // SetPropertyPrivate + } /// /// Gets the dynamic parameters for the clear-itemproperty cmdlet. @@ -659,7 +659,7 @@ internal object SetPropertyDynamicParameters( return SetPropertyDynamicParameters(providerInstance, providerPaths[0], propertyValue, newContext); } return null; - } // SetPropertyDynamicParameters + } /// /// Gets the dynamic parameters for the set-itemproperty cmdlet. @@ -739,7 +739,7 @@ private object SetPropertyDynamicParameters( e); } return result; - } // SetPropertyDynamicParameters + } #endregion SetProperty @@ -799,7 +799,7 @@ internal void ClearProperty( ClearProperty(paths, propertyToClear, context); context.ThrowFirstErrorOrDoNothing(); - } // ClearProperty + } /// /// Clears the specified property in the specified item. @@ -871,7 +871,7 @@ internal void ClearProperty( ClearPropertyPrivate(providerInstance, providerPath, propertyToClear, context); } } - } // ClearProperty + } /// /// Clears the value of the property from the item at the specified path. @@ -949,7 +949,7 @@ private void ClearPropertyPrivate( path, e); } - } // ClearPropertyPrivate + } /// /// Gets the dynamic parameters for the clear-itemproperty cmdlet. @@ -1019,7 +1019,7 @@ internal object ClearPropertyDynamicParameters( return ClearPropertyDynamicParameters(providerInstance, providerPaths[0], propertyToClear, newContext); } return null; - } // ClearPropertyDynamicParameters + } /// /// Gets the dynamic parameters for the clear-itemproperty cmdlet. @@ -1100,7 +1100,7 @@ private object ClearPropertyDynamicParameters( e); } return result; - } // ClearPropertyDynamicParameters + } #endregion ClearProperty diff --git a/src/System.Management.Automation/engine/SessionStateProviderAPIs.cs b/src/System.Management.Automation/engine/SessionStateProviderAPIs.cs index 92b60672692..2bc6d2cc61e 100644 --- a/src/System.Management.Automation/engine/SessionStateProviderAPIs.cs +++ b/src/System.Management.Automation/engine/SessionStateProviderAPIs.cs @@ -227,7 +227,7 @@ private PSDriveInfo ValidateDriveWithProvider( drive.DriveBeingCreated = false; } return result; - } // ValidateDriveWithProvider + } /// /// Gets an instance of a provider given the provider ID. @@ -255,7 +255,7 @@ internal Provider.CmdletProvider GetProviderInstance(string providerId) ProviderInfo provider = GetSingleProvider(providerId); return GetProviderInstance(provider); - } // GetProviderInstance + } /// /// Gets an instance of a provider given the provider information. @@ -277,7 +277,7 @@ internal Provider.CmdletProvider GetProviderInstance(ProviderInfo provider) } return provider.CreateInstance(); - } // GetProviderInstance + } /// /// Creates an exception for the case where the provider name matched multiple providers. @@ -355,7 +355,7 @@ internal DriveCmdletProvider GetDriveProviderInstance(string providerId) } return driveCmdletProvider; - } // GetDriveProviderInstance + } /// /// Gets an instance of an DriveCmdletProvider given the provider information. @@ -390,7 +390,7 @@ internal DriveCmdletProvider GetDriveProviderInstance(ProviderInfo provider) } return driveCmdletProvider; - } // GetDriveProviderInstance + } /// /// Gets an instance of an DriveCmdletProvider given the provider ID. @@ -425,7 +425,7 @@ private static DriveCmdletProvider GetDriveProviderInstance(CmdletProvider provi } return driveCmdletProvider; - } // GetDriveProviderInstance + } /// /// Gets an instance of an ItemCmdletProvider given the provider ID. @@ -463,7 +463,7 @@ internal ItemCmdletProvider GetItemProviderInstance(string providerId) } return itemCmdletProvider; - } // GetItemProviderInstance + } /// /// Gets an instance of an ItemCmdletProvider given the provider. @@ -498,7 +498,7 @@ internal ItemCmdletProvider GetItemProviderInstance(ProviderInfo provider) } return itemCmdletProvider; - } // GetItemProviderInstance + } /// /// Gets an instance of an ItemCmdletProvider given the provider ID. @@ -533,7 +533,7 @@ private static ItemCmdletProvider GetItemProviderInstance(CmdletProvider provide } return itemCmdletProvider; - } // GetItemProviderInstance + } /// /// Gets an instance of an ContainerCmdletProvider given the provider ID. @@ -571,7 +571,7 @@ internal ContainerCmdletProvider GetContainerProviderInstance(string providerId) } return containerCmdletProvider; - } // GetContainerProviderInstance + } /// /// Gets an instance of an ContainerCmdletProvider given the provider. @@ -606,7 +606,7 @@ internal ContainerCmdletProvider GetContainerProviderInstance(ProviderInfo provi } return containerCmdletProvider; - } // GetContainerProviderInstance + } /// /// Gets an instance of an ContainerCmdletProvider given the provider ID. @@ -641,7 +641,7 @@ private static ContainerCmdletProvider GetContainerProviderInstance(CmdletProvid } return containerCmdletProvider; - } // GetContainerProviderInstance + } /// /// Gets an instance of an NavigationCmdletProvider given the provider. @@ -676,7 +676,7 @@ internal NavigationCmdletProvider GetNavigationProviderInstance(ProviderInfo pro } return navigationCmdletProvider; - } // GetNavigationProviderInstance + } /// /// Gets an instance of an NavigationCmdletProvider given the provider ID. @@ -715,7 +715,7 @@ private static NavigationCmdletProvider GetNavigationProviderInstance(CmdletProv } return navigationCmdletProvider; - } // GetNavigationProviderInstance + } #region GetProvider @@ -753,7 +753,7 @@ internal bool IsProviderLoaded(string name) } return result; - } // IsProviderLoaded + } /// /// Gets the provider of the specified name @@ -902,7 +902,7 @@ internal Collection GetProvider(PSSnapinQualifiedName providerName } } return result; - } // GetProvider + } /// /// Gets all the CoreCommandProviders @@ -921,8 +921,8 @@ internal IEnumerable ProviderList } } return result; - } // get - } // Providers + } + } /// /// Copy the Providers from another session state instance... @@ -1069,9 +1069,9 @@ internal void InitializeProvider( { context.WriteError(exception.ErrorRecord); } - } // foreach (drive in newDrives) + } } - } // InitializeProvider + } /// /// Creates and adds a provider to the provider container @@ -1269,7 +1269,7 @@ internal ProviderInfo NewProvider(ProviderInfo provider) // Now write out the result return provider; - } // NewProvider + } private ProviderInfo ProviderExists(ProviderInfo provider) { @@ -1526,7 +1526,7 @@ internal void RemoveProvider( ProvidersCurrentWorkingDrive.Remove(provider); } } - } // RemoveProvider + } /// /// Removes the provider from the providers dictionary. @@ -1571,8 +1571,8 @@ internal int ProviderCount } return count; } - } // ProviderCount - } // SessionStateInternal class + } + } } #pragma warning restore 56500 diff --git a/src/System.Management.Automation/engine/SessionStatePublic.cs b/src/System.Management.Automation/engine/SessionStatePublic.cs index 79fe1b3d2d9..f6fd38b7998 100644 --- a/src/System.Management.Automation/engine/SessionStatePublic.cs +++ b/src/System.Management.Automation/engine/SessionStatePublic.cs @@ -31,7 +31,7 @@ internal SessionState(SessionStateInternal sessionState) } _sessionState = sessionState; - } // SessionState + } /// /// The internal constructor for this object. It should be the only one that gets called. @@ -63,7 +63,7 @@ internal SessionState(ExecutionContext context, bool createAsChild, bool linkToG } _sessionState.PublicSessionState = this; - } // SessionState + } /// /// Construct a new session state object... @@ -95,7 +95,7 @@ public DriveManagementIntrinsics Drive /// public CmdletProviderManagementIntrinsics Provider { - get { return _provider ?? (_provider = new CmdletProviderManagementIntrinsics(_sessionState)); } // get + get { return _provider ?? (_provider = new CmdletProviderManagementIntrinsics(_sessionState)); } } /// @@ -111,7 +111,7 @@ public PathIntrinsics Path /// public PSVariableIntrinsics PSVariable { - get { return _variable ?? (_variable = new PSVariableIntrinsics(_sessionState)); } // get + get { return _variable ?? (_variable = new PSVariableIntrinsics(_sessionState)); } } /// @@ -300,7 +300,7 @@ public static bool IsVisible(CommandOrigin origin, CommandInfo commandInfo) internal SessionStateInternal Internal { get { return _sessionState; } - } // Internal + } #endregion Internal methods #region private data @@ -312,7 +312,7 @@ internal SessionStateInternal Internal private PSVariableIntrinsics _variable; #endregion private data - } // SessionStatePublic + } /// /// This enum defines the visibility of execution environment elements... diff --git a/src/System.Management.Automation/engine/SessionStateScope.cs b/src/System.Management.Automation/engine/SessionStateScope.cs index 98b7e2aeb59..f39885516eb 100644 --- a/src/System.Management.Automation/engine/SessionStateScope.cs +++ b/src/System.Management.Automation/engine/SessionStateScope.cs @@ -37,7 +37,7 @@ internal SessionStateScope(SessionStateScope parentScope) { _scriptScope = this; } - } // SessionStateScope constructor + } #endregion constructor @@ -149,7 +149,7 @@ internal void NewDrive(PSDriveInfo newDrive) automountedDrives.Add(newDrive.Name, newDrive); } } - } // New Drive + } /// /// Removes the specified drive from this scope. @@ -191,7 +191,7 @@ internal void RemoveDrive(PSDriveInfo drive) } } } - } // RemoveDrive + } /// /// Removes all the drives from the scope. @@ -200,7 +200,7 @@ internal void RemoveAllDrives() { GetDrives().Clear(); GetAutomountedDrives().Clear(); - } // RemoveAllDrives + } /// /// Retrieves the drive of the specified name. @@ -232,7 +232,7 @@ internal PSDriveInfo GetDrive(string name) GetAutomountedDrives().TryGetValue(name, out result); } return result; - } // GetDrive + } /// /// Gets an IEnumerable for the drives in this scope. @@ -259,7 +259,7 @@ internal IEnumerable Drives } return result; } - } // Drives + } #endregion Drives #region Variables @@ -286,7 +286,7 @@ internal PSVariable GetVariable(string name, CommandOrigin origin) PSVariable result; TryGetVariable(name, origin, false, out result); return result; - } // GetVariable + } /// /// Gets the specified variable from the variable table. @@ -300,7 +300,7 @@ internal PSVariable GetVariable(string name, CommandOrigin origin) internal PSVariable GetVariable(string name) { return GetVariable(name, ScopeOrigin); - } // GetVariable + } /// /// Looks up a variable, returns true and the variable if found and is visible, throws if the found variable is not visible, @@ -493,7 +493,7 @@ internal PSVariable SetVariable(string name, object value, bool asValue, bool fo _variables[name] = variable; variable.SessionState = sessionState; return variable; - } // SetVariable + } /// /// Sets a variable to scope without any checks. @@ -591,7 +591,7 @@ internal PSVariable NewVariable(PSVariable newVariable, bool force, SessionState _variables[variable.Name] = variable; variable.SessionState = sessionState; return variable; - } // NewVariable + } /// /// Removes a variable from the variable table. @@ -642,7 +642,7 @@ internal void RemoveVariable(string name, bool force) // Finally mark the variable itself has having been removed so // anyone holding a reference to it can be aware of this. variable.WasRemoved = true; - } // RemoveVariable + } internal bool TrySetLocalParameterValue(string name, object value) { @@ -690,7 +690,7 @@ internal IEnumerable AliasTable { return GetAliases().Values; } - } // AliasTable + } /// /// Gets the specified alias from the alias table. @@ -711,7 +711,7 @@ internal AliasInfo GetAlias(string name) GetAliases().TryGetValue(name, out result); return result; - } // GetAlias + } /// /// Sets an alias to the given value. @@ -783,7 +783,7 @@ internal AliasInfo SetAliasValue(string name, string value, ExecutionContext con AddAliasToCache(name, value); return aliasInfos[name]; - } // SetAliasValue + } /// /// Sets an alias to the given value. @@ -899,7 +899,7 @@ internal AliasInfo SetAliasValue( AddAliasToCache(name, value); return result; - } // SetAliasValue + } /// /// Sets an alias to the given value. @@ -971,7 +971,7 @@ internal AliasInfo SetAliasItem(AliasInfo aliasToSet, bool force, CommandOrigin AddAliasToCache(aliasToSet.Name, aliasToSet.Definition); return aliasToSet; - } // SetAliasItem + } /// /// Removes a alias from the alias table. @@ -1014,7 +1014,7 @@ internal void RemoveAlias(string name, bool force) } aliasInfos.Remove(name); - } // RemoveAlias + } #endregion aliases @@ -1028,8 +1028,8 @@ internal Dictionary FunctionTable get { return GetFunctions(); - } // get - } // FunctionTable + } + } /// /// Gets the specified function from the function table. @@ -1051,7 +1051,7 @@ internal FunctionInfo GetFunction(string name) GetFunctions().TryGetValue(name, out result); return result; - } // GetFunction + } /// /// Sets an function to the given function declaration. @@ -1086,7 +1086,7 @@ internal FunctionInfo SetFunction( ExecutionContext context) { return SetFunction(name, function, null, ScopedItemOptions.Unspecified, force, origin, context); - } // SetFunction + } /// /// Sets an function to the given function declaration. /// @@ -1124,7 +1124,7 @@ internal FunctionInfo SetFunction( ExecutionContext context) { return SetFunction(name, function, originalFunction, ScopedItemOptions.Unspecified, force, origin, context); - } // SetFunction + } /// /// Sets an function to the given function declaration. @@ -1167,7 +1167,7 @@ internal FunctionInfo SetFunction( ExecutionContext context) { return SetFunction(name, function, originalFunction, options, force, origin, context, null); - } // SetFunction + } internal FunctionInfo SetFunction( string name, @@ -1324,7 +1324,7 @@ internal FunctionInfo SetFunction( } return result; - } // SetFunction + } /// /// Removes a function from the function table. @@ -1367,7 +1367,7 @@ internal void RemoveFunction(string name, bool force) } } functionInfos.Remove(name); - } // RemoveFunction + } #endregion functions @@ -1381,8 +1381,8 @@ internal Dictionary> CmdletTable get { return _cmdlets; - } // get - } // CmdletTable + } + } /// /// Gets the specified cmdlet from the cmdlet table. @@ -1412,7 +1412,7 @@ internal CmdletInfo GetCmdlet(string name) } return result; - } // GetCmdlet + } /// /// Adds a cmdlet to the cmdlet cache. @@ -1522,7 +1522,7 @@ internal CmdletInfo AddCmdletToCache( } return _cmdlets[name][0]; - } // AddCmdlet + } /// /// Removes a cmdlet from the cmdlet table. @@ -1978,6 +1978,6 @@ private void CheckVariableChangeInConstrainedLanguage(PSVariable variable) } #endregion - } // class SessionStateScope -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/SessionStateScopeAPIs.cs b/src/System.Management.Automation/engine/SessionStateScopeAPIs.cs index 71a902730d6..79e666e5008 100644 --- a/src/System.Management.Automation/engine/SessionStateScopeAPIs.cs +++ b/src/System.Management.Automation/engine/SessionStateScopeAPIs.cs @@ -109,7 +109,7 @@ internal SessionStateScope GetScopeByID(string scopeID) } return result; - } // GetScopeByID + } /// /// Given a scope ID, walks the scope list to the appropriate scope and returns it. @@ -148,7 +148,7 @@ internal SessionStateScope GetScopeByID(int scopeID) } return processingScope; - } // GetScopeByID + } /// /// The global scope of session state. Can be accessed @@ -205,7 +205,7 @@ internal SessionStateScope CurrentScope _currentScope = value; } - } // CurrentScope + } /// /// Gets the session state current script scope. @@ -238,7 +238,7 @@ internal SessionStateScope NewScope(bool isScriptScope) newScope.ScriptScope = newScope; } return newScope; - } // NewScope + } /// /// Removes the current scope from the scope tree and @@ -304,7 +304,7 @@ internal void RemoveScope(SessionStateScope scope) // Ignore all exceptions from the provider as we are // going to force the removal anyway } - } // foreach drive + } scope.RemoveAllDrives(); @@ -316,8 +316,8 @@ internal void RemoveScope(SessionStateScope scope) _currentScope = _currentScope.Parent; } scope.Parent = null; - } // RemoveScope - } // SessionStateInternal class + } + } } #pragma warning restore 56500 diff --git a/src/System.Management.Automation/engine/SessionStateScopeEnumerator.cs b/src/System.Management.Automation/engine/SessionStateScopeEnumerator.cs index 7b2db18ac6f..71b08addb19 100644 --- a/src/System.Management.Automation/engine/SessionStateScopeEnumerator.cs +++ b/src/System.Management.Automation/engine/SessionStateScopeEnumerator.cs @@ -19,7 +19,7 @@ internal SessionStateScopeEnumerator(SessionStateScope scope) { Diagnostics.Assert(scope != null, "Caller to verify scope argument"); _initialScope = scope; - } // ctor + } /// /// Uses the proper scoping rules to get the next scope to do the lookup in. @@ -38,7 +38,7 @@ public bool MoveNext() // If the current scope is the global scope there is nowhere else // to do the lookup, so return false. return (_currentEnumeratedScope != null); - } // MoveNext + } /// /// Sets the enumerator to before the first scope @@ -46,7 +46,7 @@ public bool MoveNext() public void Reset() { _currentEnumeratedScope = null; - } // Reset + } /// /// Gets the current lookup scope @@ -65,8 +65,8 @@ SessionStateScope IEnumerator.Current } return _currentEnumeratedScope; - } // get - } // Current + } + } object IEnumerator.Current { @@ -99,6 +99,6 @@ public void Dispose() private readonly SessionStateScope _initialScope; private SessionStateScope _currentEnumeratedScope; - } // class SessionStateScopeEnumerator -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/SessionStateSecurityDescriptorInterface.cs b/src/System.Management.Automation/engine/SessionStateSecurityDescriptorInterface.cs index 853ec8a3fd9..92f0437a828 100644 --- a/src/System.Management.Automation/engine/SessionStateSecurityDescriptorInterface.cs +++ b/src/System.Management.Automation/engine/SessionStateSecurityDescriptorInterface.cs @@ -46,7 +46,7 @@ internal static ISecurityDescriptorCmdletProvider GetPermissionProviderInstance( } return permissionCmdletProvider; - } // GetPermissionProviderInstance + } #endregion private methods @@ -81,7 +81,7 @@ internal Collection GetSecurityDescriptor(string path, Collection contextResults = context.GetAccumulatedObjects() ?? new Collection(); return contextResults; - } // GetSecurityDescriptor + } /// /// Gets the security descriptor from the specified item. @@ -128,7 +128,7 @@ internal void GetSecurityDescriptor( { GetSecurityDescriptor(providerInstance, providerPath, sections, context); } - } // GetSecurityDescriptor + } private void GetSecurityDescriptor( CmdletProvider providerInstance, @@ -178,7 +178,7 @@ private void GetSecurityDescriptor( path, e); } - } // GetSecurityDescriptor + } #endregion GetSecurityDescriptor @@ -218,7 +218,7 @@ internal Collection SetSecurityDescriptor(string path, ObjectSecurity Collection contextResults = context.GetAccumulatedObjects() ?? new Collection(); return contextResults; - } // SetSecurityDescriptor + } /// /// Sets the security descriptor on the specified item. @@ -274,7 +274,7 @@ internal void SetSecurityDescriptor( securityDescriptor, context); } - } // SetSecurityDescriptor + } private void SetSecurityDescriptor( CmdletProvider providerInstance, @@ -363,7 +363,7 @@ private void SetSecurityDescriptor( path, e); } - } // SetSecurityDescriptor + } #endregion SetSecurityDescriptor @@ -423,7 +423,7 @@ internal ObjectSecurity NewSecurityDescriptorFromPath( } return sd; - } // NewSecurityDescriptor + } private ObjectSecurity NewSecurityDescriptorFromPath( CmdletProvider providerInstance, @@ -478,7 +478,7 @@ private ObjectSecurity NewSecurityDescriptorFromPath( } return sd; - } // NewSecurityDescriptor + } /// /// Gets the security descriptor from the specified item. @@ -574,7 +574,7 @@ internal ObjectSecurity NewSecurityDescriptorOfType( } return sd; - } // NewSecurityDescriptorOfType + } #endregion NewSecurityDescriptor } diff --git a/src/System.Management.Automation/engine/SessionStateUtils.cs b/src/System.Management.Automation/engine/SessionStateUtils.cs index 8d4058a68cf..8d5e37955f8 100644 --- a/src/System.Management.Automation/engine/SessionStateUtils.cs +++ b/src/System.Management.Automation/engine/SessionStateUtils.cs @@ -215,7 +215,7 @@ internal static Collection CreateWildcardsFromStrings( } return result; - } // CreateWildcardsFromStrings + } /// /// Determines if the specified text matches any of the patterns @@ -263,7 +263,7 @@ internal static bool MatchesAnyWildcardPattern( } return result; - } // MatchesAnyWildcardPattern + } /// /// Converts an OpenMode enum value to a FileMode diff --git a/src/System.Management.Automation/engine/SessionStateVariableAPIs.cs b/src/System.Management.Automation/engine/SessionStateVariableAPIs.cs index f75000aa6af..d4b8f114bb1 100644 --- a/src/System.Management.Automation/engine/SessionStateVariableAPIs.cs +++ b/src/System.Management.Automation/engine/SessionStateVariableAPIs.cs @@ -62,7 +62,7 @@ internal PSVariable GetVariable(string name, CommandOrigin origin) PSVariable resultItem = GetVariableItem(variablePath, out scope, origin); return resultItem; - } // GetVariable + } /// /// Get a variable out of session state. This interface supports @@ -80,7 +80,7 @@ internal PSVariable GetVariable(string name, CommandOrigin origin) internal PSVariable GetVariable(string name) { return GetVariable(name, CommandOrigin.Internal); - } // GetVariable + } /// /// Get a variable out of session state. This interface supports @@ -123,7 +123,7 @@ internal object GetVariableValue(string name) object resultItem = GetVariableValue(variablePath, out context, out scope); return resultItem; - } // GetVariableValue + } /// /// Get a variable out of session state. This interface supports @@ -502,7 +502,7 @@ internal object GetVariableValueFromProvider( } while (false); return result; - } // GetVariableFromProvider + } #pragma warning restore 0162 /// @@ -557,7 +557,7 @@ internal PSVariable GetVariableItem( scope = searcher.CurrentLookupScope; } return result; - } // GetVariableItem + } /// /// Looks up the specified variable and returns the context under which @@ -588,7 +588,7 @@ internal PSVariable GetVariableItem( out SessionStateScope scope) { return GetVariableItem(variablePath, out scope, CommandOrigin.Internal); - } // GetVariableItem + } /// /// Get a variable out of session state. This interface supports @@ -639,7 +639,7 @@ internal PSVariable GetVariableAtScope(string name, string scopeID) } return resultItem; - } // GetVariable + } /// /// Get a variable out of session state. This interface supports @@ -896,10 +896,10 @@ internal object GetVariableValueAtScope(string name, string scopeID) { } } - } // if resultItem != null + } return resultItem; - } // GetVariableValueAtScope + } internal object GetAutomaticVariableValue(AutomaticVariable variable) { @@ -1360,7 +1360,7 @@ internal object SetVariable( #endif } return result; - } // SetVariable + } /// /// Set a variable in session state. @@ -1413,7 +1413,7 @@ internal object SetVariableAtScope(PSVariable variable, string scopeID, bool for force, this, origin); - } // SetVariableAtScope + } #region NewVariable @@ -1444,7 +1444,7 @@ internal object NewVariable(PSVariable variable, bool force) variable, force, this); - } // NewVariable + } /// /// Creates a new variable in the specified scope @@ -1493,7 +1493,7 @@ internal object NewVariableAtScope(PSVariable variable, string scopeID, bool for variable, force, this); - } // NewVariableAtScope + } #endregion NewVariable @@ -1580,7 +1580,7 @@ internal void RemoveVariable(string name, bool force) RemoveItem(new string[] { variablePath.QualifiedName }, false, context); context.ThrowFirstErrorOrDoNothing(); } - } // RemoveVariable + } /// /// Removes a variable from the variable table. @@ -1629,7 +1629,7 @@ internal void RemoveVariable(PSVariable variable, bool force) { scope.RemoveVariable(variablePath.QualifiedName, force); } - } // RemoveVariable + } /// /// Remove a variable from session state. This interface supports @@ -1723,7 +1723,7 @@ internal void RemoveVariableAtScope(string name, string scopeID, bool force) context.ThrowFirstErrorOrDoNothing(); } } - } // RemoveVariableAtScope + } /// /// Remove a variable from session state. @@ -1785,7 +1785,7 @@ internal void RemoveVariableAtScope(PSVariable variable, string scopeID, bool fo SessionStateScope lookupScope = GetScopeByID(scopeID); lookupScope.RemoveVariable(variablePath.QualifiedName, force); - } // RemoveVariableAtScope + } /// /// Gets a flattened view of the variables that are visible using @@ -1872,4 +1872,4 @@ internal IDictionary GetVariableTableAtScope(string scopeID) } // SessionStateInternal class } -#pragma warning restore 56500 \ No newline at end of file +#pragma warning restore 56500 diff --git a/src/System.Management.Automation/engine/ShellVariable.cs b/src/System.Management.Automation/engine/ShellVariable.cs index 8865391ee94..b53f53a7c1e 100644 --- a/src/System.Management.Automation/engine/ShellVariable.cs +++ b/src/System.Management.Automation/engine/ShellVariable.cs @@ -459,7 +459,7 @@ internal static bool IsValidValue(object value, Attribute attribute) } } return result; - } // IsValidValue + } /// /// Runs all ArgumentTransformationAttributes that are specified in the Attributes @@ -531,7 +531,7 @@ internal bool IsConstant { return (_options & ScopedItemOptions.Constant) != 0; } - } // IsConstant + } /// /// Returns true if the PSVariable is readonly (only visible in the @@ -543,7 +543,7 @@ internal bool IsReadOnly { return (_options & ScopedItemOptions.ReadOnly) != 0; } - } // IsReadOnly + } /// /// Returns true if the PSVariable is private (only visible in the @@ -555,7 +555,7 @@ internal bool IsPrivate { return (_options & ScopedItemOptions.Private) != 0; } - } // IsPrivate + } /// /// Returns true if the PSVariable is propagated to all scopes @@ -567,7 +567,7 @@ internal bool IsAllScope { return (_options & ScopedItemOptions.AllScope) != 0; } - } // IsAllScope + } /// /// Indicates that the variable has been removed from session state @@ -731,7 +731,7 @@ private static object PreserveValueType(object value) return value; } #endif - } // class PSVariable + } internal class LocalVariable : PSVariable { diff --git a/src/System.Management.Automation/engine/TransactedString.cs b/src/System.Management.Automation/engine/TransactedString.cs index 978dc204d71..5b13bc9be22 100644 --- a/src/System.Management.Automation/engine/TransactedString.cs +++ b/src/System.Management.Automation/engine/TransactedString.cs @@ -193,5 +193,5 @@ private void ValidateTransactionOrEnlist() } } } -} // namespace Microsoft.Test.Management.Automation +} diff --git a/src/System.Management.Automation/engine/TypeMetadata.cs b/src/System.Management.Automation/engine/TypeMetadata.cs index e7f31aa5625..b89f788ae67 100644 --- a/src/System.Management.Automation/engine/TypeMetadata.cs +++ b/src/System.Management.Automation/engine/TypeMetadata.cs @@ -1277,7 +1277,7 @@ private void ConstructCompiledParametersUsingRuntimeDefinedParameters( CompiledCommandParameter parameter = new CompiledCommandParameter(parameterDefinition, processingDynamicParameters); AddParameter(parameter, checkNames); } - } // ConstructCompiledParametersUsingRuntimeDefinedParameters + } /// /// Compiles the parameter using reflection against the CLR type. @@ -1321,7 +1321,7 @@ private void ConstructCompiledParametersUsingReflection(bool processingDynamicPa AddParameter(field, processingDynamicParameters); } - } // ConstructCompiledParametersUsingReflection + } private void CheckForReservedParameter(string name) { @@ -1488,7 +1488,7 @@ private static bool IsMemberAParameter(MemberInfo member) member.Name, argumentException.Message); } - } // IsMemberAParameter + } #endregion helper methods @@ -1502,6 +1502,6 @@ private static bool IsMemberAParameter(MemberInfo member) new System.Collections.Concurrent.ConcurrentDictionary(StringComparer.Ordinal); #endregion Metadata cache - } // CompiledCommandParameter + } } diff --git a/src/System.Management.Automation/engine/UserFeedbackParameters.cs b/src/System.Management.Automation/engine/UserFeedbackParameters.cs index 476ff28cc29..1dbf3ae5d7c 100644 --- a/src/System.Management.Automation/engine/UserFeedbackParameters.cs +++ b/src/System.Management.Automation/engine/UserFeedbackParameters.cs @@ -118,7 +118,7 @@ internal ShouldProcessParameters(MshCommandRuntime commandRuntime) throw PSTraceSource.NewArgumentNullException("commandRuntime"); } _commandRuntime = commandRuntime; - } // ctor + } #endregion ctor #region parameters @@ -179,7 +179,7 @@ public sealed class TransactionParameters internal TransactionParameters(MshCommandRuntime commandRuntime) { _commandRuntime = commandRuntime; - } // ctor + } #endregion ctor #region parameters diff --git a/src/System.Management.Automation/engine/VariableInterfaces.cs b/src/System.Management.Automation/engine/VariableInterfaces.cs index 41283444ba2..3e3a89decb8 100644 --- a/src/System.Management.Automation/engine/VariableInterfaces.cs +++ b/src/System.Management.Automation/engine/VariableInterfaces.cs @@ -20,7 +20,7 @@ private PSVariableIntrinsics() Dbg.Diagnostics.Assert( false, "This constructor should never be called. Only the constructor that takes an instance of SessionState should be called."); - } // PSVariableInterfaces private + } /// /// Constructs a facade for the specified session. @@ -39,7 +39,7 @@ internal PSVariableIntrinsics(SessionStateInternal sessionState) } _sessionState = sessionState; - } // PSVariableInterfaces internal + } #endregion Constructors @@ -78,7 +78,7 @@ public PSVariable Get(string name) } return _sessionState.GetVariable(name); - } // Get + } /// /// Gets the specified variable from session state in the specified scope. @@ -115,7 +115,7 @@ internal PSVariable GetAtScope(string name, string scope) // Parameter validation is done in the session state object return _sessionState.GetVariableAtScope(name, scope); - } // GetAtScope + } /// /// Gets the specified variable value from session state. @@ -152,7 +152,7 @@ public object GetValue(string name) // Parameter validation is done in the session state object return _sessionState.GetVariableValue(name); - } // GetValue + } /// /// Gets the specified variable from session state. If the variable @@ -194,7 +194,7 @@ public object GetValue(string name, object defaultValue) // Parameter validation is done in the session state object return _sessionState.GetVariableValue(name) ?? defaultValue; - } // GetValue + } /// /// Gets the specified variable from session state in the specified scope. @@ -244,7 +244,7 @@ internal object GetValueAtScope(string name, string scope) // Parameter validation is done in the session state object return _sessionState.GetVariableValueAtScope(name, scope); - } // GetValueAtScope + } /// /// Sets the variable to the specified value. @@ -284,7 +284,7 @@ public void Set(string name, object value) // Parameter validation is done in the session state object _sessionState.SetVariableValue(name, value, CommandOrigin.Internal); - } // SetVariable + } /// /// Sets the variable. @@ -307,7 +307,7 @@ public void Set(PSVariable variable) // Parameter validation is done in the session state object _sessionState.SetVariable(variable, false, CommandOrigin.Internal); - } // SetVariable + } /// /// Removes the specified variable from session state. @@ -344,7 +344,7 @@ public void Remove(string name) // Parameter validation is done in the session state object _sessionState.RemoveVariable(name); - } // RemoveVariable + } /// /// Removes the specified variable from session state. @@ -367,7 +367,7 @@ public void Remove(PSVariable variable) // Parameter validation is done in the session state object _sessionState.RemoveVariable(variable); - } // RemoveVariable + } /// /// Removes the specified variable from the specified scope @@ -444,6 +444,6 @@ internal void RemoveAtScope(PSVariable variable, string scope) private SessionStateInternal _sessionState; #endregion private data - } // PSVariableIntrinsics + } } diff --git a/src/System.Management.Automation/engine/VariablePath.cs b/src/System.Management.Automation/engine/VariablePath.cs index 1ccb7db4721..0cdbd665025 100644 --- a/src/System.Management.Automation/engine/VariablePath.cs +++ b/src/System.Management.Automation/engine/VariablePath.cs @@ -317,4 +317,4 @@ internal FunctionLookupPath(string path) { } } -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/engine/WorkflowInfo.cs b/src/System.Management.Automation/engine/WorkflowInfo.cs index 32ff6b05eca..8038de65883 100644 --- a/src/System.Management.Automation/engine/WorkflowInfo.cs +++ b/src/System.Management.Automation/engine/WorkflowInfo.cs @@ -140,7 +140,7 @@ internal WorkflowInfo(string name, ScriptBlock workflow, ExecutionContext contex /// internal WorkflowInfo(string name, ScriptBlock workflow, ScopedItemOptions options, ExecutionContext context) : this(name, workflow, options, context, null) { - } // workflowInfo ctor + } /// /// Creates an instance of the WorkflowInfo class with the specified name and ScriptBlock @@ -167,7 +167,7 @@ internal WorkflowInfo(string name, ScriptBlock workflow, ScopedItemOptions optio : base(name, workflow, options, context, helpFile) { SetCommandType(CommandTypes.Workflow); - } // workflowInfo ctor + } /// /// This is a copy constructor. @@ -274,5 +274,5 @@ internal override HelpCategory HelpCategory { get { return HelpCategory.Workflow; } } - } // WorkflowInfo -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/cmdlet.cs b/src/System.Management.Automation/engine/cmdlet.cs index df25607ad3e..767fa53cb8d 100644 --- a/src/System.Management.Automation/engine/cmdlet.cs +++ b/src/System.Management.Automation/engine/cmdlet.cs @@ -1801,7 +1801,7 @@ protected virtual void StopProcessing() #endregion Exposed API Override #endregion public_methods - } // Cmdlet + } /// /// This describes the reason why ShouldProcess returned what it returned. diff --git a/src/System.Management.Automation/engine/hostifaces/LocalConnection.cs b/src/System.Management.Automation/engine/hostifaces/LocalConnection.cs index 3d93afc65e7..05f3138aca9 100644 --- a/src/System.Management.Automation/engine/hostifaces/LocalConnection.cs +++ b/src/System.Management.Automation/engine/hostifaces/LocalConnection.cs @@ -994,12 +994,12 @@ private void StopOrDisconnectAllJobs() disconnectRunspaces.AddRange(jobRunspaces); } } - } // foreach job + } // Stop jobs. throttleManager.EndSubmitOperations(); jobsStopCompleted.WaitOne(); - } // using jobsStopCompleted + } // Disconnect all disconnectable job runspaces found. CloseOrDisconnectAllRemoteRunspaces(() => @@ -1583,7 +1583,7 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont } #endregion Serialization - } // RunspaceOpenException + } #endregion Helper Class } diff --git a/src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs b/src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs index baae88f4fed..71a82b3f0af 100644 --- a/src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs +++ b/src/System.Management.Automation/engine/hostifaces/MshHostUserInterface.cs @@ -1287,5 +1287,5 @@ internal static int DetermineChoicePicked(string response, Collection(PSDataCollection i } pool.RemoteRunspacePoolInternal.CreatePowerShellOnServerAndInvoke(RemotePowerShell); - } // lock + } RaiseStateChangeEvent(InvocationStateInfo.Clone()); } diff --git a/src/System.Management.Automation/engine/hostifaces/RunspacePoolInternal.cs b/src/System.Management.Automation/engine/hostifaces/RunspacePoolInternal.cs index 2309146a6a0..2326487e35a 100644 --- a/src/System.Management.Automation/engine/hostifaces/RunspacePoolInternal.cs +++ b/src/System.Management.Automation/engine/hostifaces/RunspacePoolInternal.cs @@ -1579,7 +1579,7 @@ protected void ServicePendingRequests(object useCallingThreadState) ThreadPool.QueueUserWorkItem(new WaitCallback(runspaceRequester.DoComplete)); } } - } // end lock(ultimateRequestQueue) + } lock (runspaceRequestQueue) { @@ -1637,7 +1637,7 @@ protected void AssertIfStateIsBeforeOpen() ); throw e; } - } // AssertIfStateIsBeforeOpen + } /// /// Raises the ForwardEvent event diff --git a/src/System.Management.Automation/engine/lang/parserutils.cs b/src/System.Management.Automation/engine/lang/parserutils.cs index 929afbb07e5..6cb2ca97dad 100644 --- a/src/System.Management.Automation/engine/lang/parserutils.cs +++ b/src/System.Management.Automation/engine/lang/parserutils.cs @@ -1581,7 +1581,7 @@ internal static object CallMethod( throw InterpreterError.NewInterpreterExceptionByMessage(typeof(RuntimeException), errorPosition, e.Message, "MethodInvocationException", e); } - } // CallMethod + } } #endregion ParserOps diff --git a/src/System.Management.Automation/engine/lang/scriptblock.cs b/src/System.Management.Automation/engine/lang/scriptblock.cs index 5f7c164dcf9..5ac28c17dc5 100644 --- a/src/System.Management.Automation/engine/lang/scriptblock.cs +++ b/src/System.Management.Automation/engine/lang/scriptblock.cs @@ -1315,7 +1315,7 @@ protected ScriptBlockToPowerShellNotSupportedException(SerializationInfo info, S #endregion ctor - } // ScriptBlockToPowerShellNotSupportedException + } /// /// Defines Event arguments passed to OnScriptBlockInvocationEventHandler diff --git a/src/System.Management.Automation/engine/pipeline.cs b/src/System.Management.Automation/engine/pipeline.cs index b46d008e938..e5ca55baf92 100644 --- a/src/System.Management.Automation/engine/pipeline.cs +++ b/src/System.Management.Automation/engine/pipeline.cs @@ -404,7 +404,7 @@ internal int AddCommand(CommandProcessorBase commandProcessor, int readFromComma // the same pipe as the downstream cmdlet's input prevcommandProcessor.CommandRuntime.ErrorOutputPipe = UpstreamPipe; } - } // if MergeUnclaimedPreviousErrorResults + } } _commands.Add(commandProcessor); @@ -414,7 +414,7 @@ internal int AddCommand(CommandProcessorBase commandProcessor, int readFromComma commandProcessor.CommandRuntime.PipelineProcessor = this; return _commands.Count; - } // AddCommand( CommandProcessorBase commandProcessor, int readFromCommand, bool readErrorQueue ) + } // 2005/03/08-JonN: This is an internal API /// @@ -571,7 +571,7 @@ internal Array SynchronousExecuteEnumerate(object input) Diagnostics.Assert(toRethrowInfo != null, "Alternate protocol path failure"); toRethrowInfo.Throw(); return null; // UNREACHABLE - } // internal Array SynchronousExecuteEnumerate() + } private void DoCompleteCore(CommandProcessorBase commandRequestingUpstreamCommandsToStop) { @@ -726,7 +726,7 @@ internal Array DoComplete() Diagnostics.Assert(toRethrowInfo != null, "Alternate protocol path failure"); toRethrowInfo.Throw(); return null; // UNREACHABLE - } // internal Array DoComplete() + } /// /// This routine starts the stepping process. It is optional to @@ -802,8 +802,8 @@ internal void Stop() continue; } #pragma warning restore 56500 - } // for (int i = 0; i < _commands.Count; i++) - } // Stop() + } + } #endregion public_methods @@ -880,7 +880,7 @@ internal Array Step(object input) DisposeCommands(); throw; } - } // internal Array DoStepItems + } /// /// Prepares the pipeline for execution. @@ -1047,7 +1047,7 @@ private void Start(bool incomingStream) commandProcessor.DoBegin(); } - } // private void Start + } /// /// Add ExternalErrorOutput to all commands whose error @@ -1156,7 +1156,7 @@ private void Inject(object input, bool enumerate) // Execute the first command - In the streamlet model, Execute of the first command will // automatically call the downstream command incase if there are any objects in the pipe. firstcommandProcessor.DoExecute(); - } // private void Inject + } /// /// Retrieve results from the pipeline. @@ -1216,7 +1216,7 @@ private Array RetrieveResults() if (results == null) return MshCommandRuntime.StaticEmptyArray; return results; - } // private Array RetrieveResults + } /// /// Links this pipeline to a pre-existing Pipe object. This allows nested pipes @@ -1238,7 +1238,7 @@ internal void LinkPipelineSuccessOutput(Pipe pipeToUse) LastCommandProcessor.CommandRuntime.OutputPipe = pipeToUse; _linkedSuccessOutput = true; - } // private void SetResultPipe + } internal void LinkPipelineErrorOutput(Pipe pipeToUse) { @@ -1561,5 +1561,5 @@ internal enum PipelineExecutionStatus PipelineComplete } } -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/engine/regex.cs b/src/System.Management.Automation/engine/regex.cs index a830fa1393b..45fbc23789b 100644 --- a/src/System.Management.Automation/engine/regex.cs +++ b/src/System.Management.Automation/engine/regex.cs @@ -353,7 +353,7 @@ public static string Unescape(string pattern) } return s; - } // Unescape + } private static bool IsWildcardChar(char ch) { diff --git a/src/System.Management.Automation/engine/remoting/client/Job.cs b/src/System.Management.Automation/engine/remoting/client/Job.cs index 0ea8b8f7dc6..551d84677b3 100644 --- a/src/System.Management.Automation/engine/remoting/client/Job.cs +++ b/src/System.Management.Automation/engine/remoting/client/Job.cs @@ -1579,7 +1579,7 @@ internal List GetJobsForLocation(String location) } return returnJobList; - } // GetJobsForLocation + } #endregion Private/Internal Methods @@ -1883,7 +1883,7 @@ internal List GetJobsForComputer(String computerName) } return returnJobList; - } // GetResultForComputer + } /// /// Get entity result for the specified runspace @@ -1905,7 +1905,7 @@ internal List GetJobsForRunspace(PSSession runspace) } } return returnJobList; - } // GetResultForRunspace + } /// /// Get entity result for the specified helper object @@ -1929,7 +1929,7 @@ internal List GetJobsForOperation(IThrottleOperation operation) } return returnJobList; - } // GetResultForHelper + } #endregion internal methods @@ -2313,12 +2313,12 @@ private void SetStatusMessage() // } // break; // } - // } // for (int ... + // } // setFinished = true; - // } // if (finishedCount ... - // } // lock... - } // SetStatusMessage + // } + // } + } #region finish logic @@ -3097,7 +3097,7 @@ private void HandleHostCalls(object sender, EventArgs eventArgs) } } }// if (hostCallsStream... - } // HandleHostCalls + } /// /// Handle changes in pipeline states @@ -3160,7 +3160,7 @@ private void HandleThrottleComplete(object sender, EventArgs eventArgs) //DoFinish has logic to check if it has been already called and second call //becomes noOp. DoFinish(); - } // HandleThrottleComplete + } /// /// Handle the operation complete event @@ -3327,7 +3327,7 @@ protected void ProcessJobFailure(ExecutionCmdletHelper helper, out Exception fai failureErrorRecord = new ErrorRecord(failureException, targetObject, fullyQualifiedErrorId, ErrorCategory.OpenError, null, null, null, null, null, errorDetails, null); - } // if (runspace... + } else if (pipeline.PipelineStateInfo.State == PipelineState.Failed) { object targetObject = runspace.ConnectionInfo.ComputerName; @@ -3360,8 +3360,8 @@ protected void ProcessJobFailure(ExecutionCmdletHelper helper, out Exception fai OriginInfo originInfo = new OriginInfo(computerName, runspaceId); failureErrorRecord = new RemotingErrorRecord(errorRecord, originInfo); - } // if (exception != null... - } // if (pipeline... + } + } } /// diff --git a/src/System.Management.Automation/engine/remoting/client/RemoteRunspacePoolInternal.cs b/src/System.Management.Automation/engine/remoting/client/RemoteRunspacePoolInternal.cs index 895cb8fb678..47fb1a7d90f 100644 --- a/src/System.Management.Automation/engine/remoting/client/RemoteRunspacePoolInternal.cs +++ b/src/System.Management.Automation/engine/remoting/client/RemoteRunspacePoolInternal.cs @@ -362,7 +362,7 @@ internal override bool SetMaxRunspaces(int maxRunspaces) callId = DispatchTable.CreateNewCallId(); DataStructureHandler.SendSetMaxRunspacesToServer(maxRunspaces, callId); - } // lock ... + } // this call blocks until the response is received object response = DispatchTable.GetResponse(callId, false); @@ -425,7 +425,7 @@ internal override bool SetMinRunspaces(int minRunspaces) callId = DispatchTable.CreateNewCallId(); DataStructureHandler.SendSetMinRunspacesToServer(minRunspaces, callId); - } // lock ... + } // this call blocks until the response is received object response = DispatchTable.GetResponse(callId, false); @@ -476,7 +476,7 @@ internal override int GetAvailableRunspaces() } DataStructureHandler.SendGetAvailableRunspacesToServer(callId); - } // lock ... + } // this call blocks until the response is received object response = DispatchTable.GetResponse(callId, 0); @@ -594,7 +594,7 @@ internal void HandleStateInfoReceived(object sender, // Delay notifying upper layers of finished state change event // until after transport close ack is received (HandleSessionClosed handler). } - } // else if ... + } } /// diff --git a/src/System.Management.Automation/engine/remoting/client/RemotingProtocol2.cs b/src/System.Management.Automation/engine/remoting/client/RemotingProtocol2.cs index 202077315a1..4469350fb99 100644 --- a/src/System.Management.Automation/engine/remoting/client/RemotingProtocol2.cs +++ b/src/System.Management.Automation/engine/remoting/client/RemotingProtocol2.cs @@ -196,8 +196,8 @@ internal void ProcessReceivedData(RemoteDataObject receivedData) PSEventArgsReceived.SafeInvoke(this, new RemoteDataEventArgs(psEventArgs)); } break; - } // switch ... - } // ProcessReceivedData + } + } /// /// Creates a PowerShell data structure handler instance associated @@ -589,7 +589,7 @@ private void HandleClientRemoteSessionStateChanged( _closingReason = e.SessionStateInfo.Reason; } } - } // HandleClientRemoteSessionStateChanged + } /// /// Session is reporting that URI is getting redirected. @@ -641,7 +641,7 @@ private void NotifyAssociatedPowerShells(RunspacePoolStateInfo stateInfo) { dsHandler.SetStateToFailed(stateInfo.Reason); } - } // if ... + } else if (stateInfo.State == RunspacePoolState.Closed) { foreach (ClientPowerShellDataStructureHandler dsHandler in dsHandlers) @@ -1182,7 +1182,7 @@ internal void SendInput(ObjectStreamBase inputstream) inputstream.DataReady += new EventHandler(HandleInputDataReady); WriteInput(inputstream); } - } // else ... + } } /// @@ -1315,8 +1315,8 @@ internal void ProcessReceivedData(RemoteDataObject receivedData) Dbg.Assert(false, "we should not be encountering this"); } break; - } // switch ... - } // ProcessReceivedData + } + } /// /// Set the state of the associated powershell to stopped diff --git a/src/System.Management.Automation/engine/remoting/client/clientremotesessionprotocolstatemachine.cs b/src/System.Management.Automation/engine/remoting/client/clientremotesessionprotocolstatemachine.cs index 623ddb4be36..2528936c969 100644 --- a/src/System.Management.Automation/engine/remoting/client/clientremotesessionprotocolstatemachine.cs +++ b/src/System.Management.Automation/engine/remoting/client/clientremotesessionprotocolstatemachine.cs @@ -312,7 +312,7 @@ private void SetStateHandler(object sender, RemoteSessionStateMachineEventArgs e } } break; - } // switch... + } } /// @@ -333,7 +333,7 @@ private void HandleKeyExchangeTimeout(object sender) new PSRemotingDataStructureException(RemotingErrorIdStrings.ClientKeyExchangeFailed); RaiseEvent(new RemoteSessionStateMachineEventArgs(RemoteSessionEvent.KeyReceiveFailed, exception)); - } // SetStateHandler + } /// /// Handler to be used in cases, where raising an event to diff --git a/src/System.Management.Automation/engine/remoting/client/remotepipeline.cs b/src/System.Management.Automation/engine/remoting/client/remotepipeline.cs index 09567e20f68..af063ab2692 100644 --- a/src/System.Management.Automation/engine/remoting/client/remotepipeline.cs +++ b/src/System.Management.Automation/engine/remoting/client/remotepipeline.cs @@ -779,7 +779,7 @@ private void SetPipelineState(PipelineState state, Exception reason) _pipelineStateInfo.Clone(), previousAvailability, _runspace.RunspaceAvailability)); - } // lock... + } // using the copyStateInfo here as this piece of code is // outside of lock and _pipelineStateInfo might get changed diff --git a/src/System.Management.Automation/engine/remoting/commands/CustomShellCommands.cs b/src/System.Management.Automation/engine/remoting/commands/CustomShellCommands.cs index d7af6a4dce9..30a0e8a32a8 100644 --- a/src/System.Management.Automation/engine/remoting/commands/CustomShellCommands.cs +++ b/src/System.Management.Automation/engine/remoting/commands/CustomShellCommands.cs @@ -4005,9 +4005,9 @@ private PSObject ConstructPropertiesForUpdate() string encodedSessionConfigData = SecurityElement.Escape(sessionConfigData); result.Properties.Add(new PSNoteProperty(ConfigurationDataFromXML.SESSIONCONFIGTOKEN, encodedSessionConfigData)); } - } // end of using (...) - } // end of if (unsetModulePath || !string.IsNullOrEmpty(modulePathParameter)) - } // end of if (modulePathSpecified) + } + } + } // DISC endpoint if (Path != null) diff --git a/src/System.Management.Automation/engine/remoting/commands/DisconnectPSSession.cs b/src/System.Management.Automation/engine/remoting/commands/DisconnectPSSession.cs index 59c2ac59154..3cec1380188 100644 --- a/src/System.Management.Automation/engine/remoting/commands/DisconnectPSSession.cs +++ b/src/System.Management.Automation/engine/remoting/commands/DisconnectPSSession.cs @@ -561,5 +561,5 @@ private void Dispose(bool disposing) private ObjectStream _stream = new ObjectStream(); #endregion - } // DisconnectPSSessionCommand + } } diff --git a/src/System.Management.Automation/engine/remoting/commands/GetJob.cs b/src/System.Management.Automation/engine/remoting/commands/GetJob.cs index 96106647f19..ea147508cbc 100644 --- a/src/System.Management.Automation/engine/remoting/commands/GetJob.cs +++ b/src/System.Management.Automation/engine/remoting/commands/GetJob.cs @@ -111,7 +111,7 @@ protected override void ProcessRecord() jobList.Sort((x, y) => x != null ? x.Id.CompareTo(y != null ? y.Id : 1) : -1); WriteObject(jobList, true); - } // ProcessRecord + } #endregion Overrides diff --git a/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs b/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs index 4ef3b02a97a..1dea3c21429 100644 --- a/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs +++ b/src/System.Management.Automation/engine/remoting/commands/InvokeCommandCommand.cs @@ -1088,10 +1088,10 @@ protected override void ProcessRecord() } } break; - } // switch ... - } // else ... + } + } } - } // if (!pipelineinvoked... + } if (InputObject != AutomationNull.Value && !_inputStreamClosed) { @@ -1115,7 +1115,7 @@ protected override void ProcessRecord() } } } - } // ProcessRecord + } /// /// InvokeAsync would have been called in ProcessRecord. Wait here @@ -1219,11 +1219,11 @@ protected override void EndProcessing() // finally dispose the job. _job.Dispose(); - } // if (needToCollect... + } }// else - job == null } }// if (!async ... - } // EndProcessing + } /// /// This method is called when the user sends a stop signal to the @@ -1310,7 +1310,7 @@ private void HandleThrottleComplete(object sender, EventArgs eventArgs) { _operationsComplete.Set(); _throttleManager.ThrottleComplete -= new EventHandler(HandleThrottleComplete); - } // HandleThrottleComplete + } /// /// Clears the internal invoke command instance on all @@ -2023,7 +2023,7 @@ private void Dispose(bool disposing) } } } - } // Dispose + } #endregion IDisposable Overrides } diff --git a/src/System.Management.Automation/engine/remoting/commands/PSRemotingCmdlet.cs b/src/System.Management.Automation/engine/remoting/commands/PSRemotingCmdlet.cs index 63da4d0b339..5ea614dc487 100644 --- a/src/System.Management.Automation/engine/remoting/commands/PSRemotingCmdlet.cs +++ b/src/System.Management.Automation/engine/remoting/commands/PSRemotingCmdlet.cs @@ -981,7 +981,7 @@ protected void ValidateRemoteRunspacesSpecified() PSRemotingErrorId.RemoteRunspaceInfoLimitExceeded.ToString(), ErrorCategory.InvalidArgument, Session)); } - } // ValidateRemoteRunspacesSpecified + } /// /// Updates connection info with the data read from cmdlet's parameters and @@ -1462,7 +1462,7 @@ protected void CreateHelpersForSpecifiedRunspaces() IThrottleOperation operation = new ExecutionCmdletHelperRunspace(pipelines[i]); Operations.Add(operation); } - } // CreateHelpersForSpecifiedRunspaces + } /// /// Creates helper objects with the command for the specified @@ -1528,7 +1528,7 @@ protected void CreateHelpersForSpecifiedUris() Operations.Add(operation); } - } // CreateHelpersForSpecifiedUris + } /// /// Creates helper objects with the command for the specified @@ -1907,7 +1907,7 @@ protected void CloseAllInputStreams() ExecutionCmdletHelper helper = (ExecutionCmdletHelper)operation; helper.Pipeline.Input.Close(); } - } // CloseAllInputStreams + } /// /// Writes an error record specifying that creation of remote runspace @@ -1926,7 +1926,7 @@ private void WriteErrorCreateRemoteRunspaceFailed(Exception e, Uri uri) ErrorCategory.InvalidArgument, uri); WriteError(errorRecord); - } // WriteErrorCreateRemoteRunspaceFailed + } /// /// FilePathComputername parameter set @@ -3245,7 +3245,7 @@ private void HandleDebuggerStop(object sender, DebuggerStopEventArgs args) #endregion - } // ExecutionCmdletHelper + } /// /// Contains a pipeline and calls InvokeAsync on the pipeline @@ -3306,7 +3306,7 @@ internal override void StartOperation() internalException = e; RaiseOperationCompleteEvent(); } - } // StartOperation + } /// /// Closes the pipeline asynchronously @@ -3329,7 +3329,7 @@ internal override void StopOperation() // else ThrottleManager will have RaiseOperationCompleteEvent(); } - } // StopOperation + } internal override event EventHandler OperationComplete; @@ -3355,7 +3355,7 @@ private void HandlePipelineStateChanged(object sender, PipelineStateEventArgs st } RaiseOperationCompleteEvent(stateEventArgs); - } // HandlePipelineStateChanged + } /// /// Raise an OperationComplete Event. The base event will be @@ -3364,7 +3364,7 @@ private void HandlePipelineStateChanged(object sender, PipelineStateEventArgs st private void RaiseOperationCompleteEvent() { RaiseOperationCompleteEvent(null); - } // RaiseOperationCompleteEvent + } /// /// Raise an operation complete event. @@ -3393,8 +3393,8 @@ private void RaiseOperationCompleteEvent(EventArgs baseEventArgs) { OperationComplete.SafeInvoke(this, operationStateEventArgs); } - } // RaiseOperationCompleteEvent - } // ExecutionCmdletHelperRunspace + } + } /// /// This helper class contains a runspace and @@ -3448,7 +3448,7 @@ internal ExecutionCmdletHelperComputerName(RemoteRunspace remoteRunspace, Pipeli this.pipeline = pipeline; pipeline.StateChanged += new EventHandler(HandlePipelineStateChanged); - } // IREHelperComputerName + } /// /// Call OpenAsync() on the RemoteRunspace @@ -3464,7 +3464,7 @@ internal override void StartOperation() internalException = e; RaiseOperationCompleteEvent(); } - } // StartOperation + } /// /// StopAsync on the pipeline @@ -3494,7 +3494,7 @@ internal override void StopOperation() // this StopOperation to complete RaiseOperationCompleteEvent(); } - } // StopOperation + } internal override event EventHandler OperationComplete; @@ -3563,8 +3563,8 @@ private void HandleRunspaceStateChanged(object sender, } } break; - } // switch (state... - } // HandleRunspaceStateChanged + } + } /// /// Handles the state changed event for the pipeline. @@ -3591,8 +3591,8 @@ private void HandlePipelineStateChanged(object sender, RemoteRunspace.CloseAsync(); } break; - } // switch(state... - } // HandlePipelineStateChanged + } + } /// /// Raise an OperationComplete Event. The base event will be @@ -3601,7 +3601,7 @@ private void HandlePipelineStateChanged(object sender, private void RaiseOperationCompleteEvent() { RaiseOperationCompleteEvent(null); - } // RaiseOperationCompleteEvent + } /// /// Raise an operation complete event. @@ -3631,8 +3631,8 @@ private void RaiseOperationCompleteEvent(EventArgs baseEventArgs) OperationState.StopComplete; operationStateEventArgs.BaseEvent = baseEventArgs; OperationComplete.SafeInvoke(this, operationStateEventArgs); - } // RaiseOperationCompleteEvent - } // ExecutionCmdletHelperComputerName + } + } #region Path Resolver @@ -3773,7 +3773,7 @@ private static PathInfo ResolvePath( results)); return null; } - } // ResolvePath + } } #endregion diff --git a/src/System.Management.Automation/engine/remoting/commands/PushRunspaceCommand.cs b/src/System.Management.Automation/engine/remoting/commands/PushRunspaceCommand.cs index 183472f034b..62eb357a2de 100644 --- a/src/System.Management.Automation/engine/remoting/commands/PushRunspaceCommand.cs +++ b/src/System.Management.Automation/engine/remoting/commands/PushRunspaceCommand.cs @@ -525,7 +525,7 @@ protected override void EndProcessing() { break; } - } // while ... + } } }// EndProcessing() diff --git a/src/System.Management.Automation/engine/remoting/commands/ReceiveJob.cs b/src/System.Management.Automation/engine/remoting/commands/ReceiveJob.cs index 7b228eb2900..5f674e68947 100644 --- a/src/System.Management.Automation/engine/remoting/commands/ReceiveJob.cs +++ b/src/System.Management.Automation/engine/remoting/commands/ReceiveJob.cs @@ -355,8 +355,8 @@ protected override void ProcessRecord() jobsToWrite.AddRange(childJobs); //WriteResultsForJobsInCollection(childJobs, false); - } // foreach(RemoteRunspaceInfo... - } // foreach ... + } + } } break; @@ -390,8 +390,8 @@ protected override void ProcessRecord() jobsToWrite.AddRange(childJobs); //WriteResultsForJobsInCollection(childJobs, false); - } // foreach (String... - } // foreach ... + } + } } break; @@ -413,8 +413,8 @@ protected override void ProcessRecord() List childJobs = job.GetJobsForLocation(location); jobsToWrite.AddRange(childJobs); //WriteResultsForJobsInCollection(childJobs, false); - } // foreach (String... - } // foreach ... + } + } } } break; @@ -507,7 +507,7 @@ protected override void ProcessRecord() { WriteResultsForJobsInCollection(jobsToWrite, checkForRecurse, false); } - } // ProcessRecord + } /// /// StopProcessing - when the command is stopped, @@ -955,7 +955,7 @@ private void WriteJobResultsRecursivelyHelper(Hashtable duplicate, Job job, bool WriteJobResults(job); WriteJobStateInformationIfRequired(job); } - } // WriteAllEntities + } /// /// Writes the job objects if required by the cmdlet diff --git a/src/System.Management.Automation/engine/remoting/commands/RemoveJob.cs b/src/System.Management.Automation/engine/remoting/commands/RemoveJob.cs index f58a63fa466..684d95af583 100644 --- a/src/System.Management.Automation/engine/remoting/commands/RemoveJob.cs +++ b/src/System.Management.Automation/engine/remoting/commands/RemoveJob.cs @@ -169,7 +169,7 @@ private bool FindJobsMatchingByNameHelper(List matches, IList jobsToSe jobFound = true; } } - } // foreach ... + } return jobFound; } @@ -901,7 +901,7 @@ protected override void ProcessRecord() RemoveJobAndDispose(job, job2 != null); } } - } // ProcessRecord + } /// /// Wait for all the stop jobs to be completed diff --git a/src/System.Management.Automation/engine/remoting/commands/StartJob.cs b/src/System.Management.Automation/engine/remoting/commands/StartJob.cs index 930cea82a64..5f6d3de5036 100644 --- a/src/System.Management.Automation/engine/remoting/commands/StartJob.cs +++ b/src/System.Management.Automation/engine/remoting/commands/StartJob.cs @@ -536,7 +536,7 @@ protected override void BeginProcessing() SkipWinRMCheck = true; base.BeginProcessing(); - } // CoreBeginProcessing + } /// /// Create a throttle operation using NewProcessConnectionInfo @@ -678,7 +678,7 @@ protected override void ProcessRecord() helper.Pipeline.Input.Write(InputObject); } } - } // ProcessRecord + } private bool _firstProcessRecord = true; /// @@ -689,7 +689,7 @@ protected override void EndProcessing() { // close the input stream on all the pipelines CloseAllInputStreams(); - } // EndProcessing + } #endregion Overrides @@ -714,7 +714,7 @@ private void Dispose(bool disposing) { CloseAllInputStreams(); } - } // Dispose + } #endregion IDisposable Overrides } diff --git a/src/System.Management.Automation/engine/remoting/commands/getrunspacecommand.cs b/src/System.Management.Automation/engine/remoting/commands/getrunspacecommand.cs index ab75544e2f7..d7d25c9b4cf 100644 --- a/src/System.Management.Automation/engine/remoting/commands/getrunspacecommand.cs +++ b/src/System.Management.Automation/engine/remoting/commands/getrunspacecommand.cs @@ -348,7 +348,7 @@ protected override void ProcessRecord() { GetMatchingRunspaces(true, true, this.State, this.ConfigurationName); } - } // ProcessRecord + } /// /// End processing clean up. diff --git a/src/System.Management.Automation/engine/remoting/commands/newrunspacecommand.cs b/src/System.Management.Automation/engine/remoting/commands/newrunspacecommand.cs index ea3ce568941..edda1bbd0fa 100644 --- a/src/System.Management.Automation/engine/remoting/commands/newrunspacecommand.cs +++ b/src/System.Management.Automation/engine/remoting/commands/newrunspacecommand.cs @@ -188,7 +188,7 @@ protected override void BeginProcessing() ConfigurationName = String.Empty; } } - } // BeginProcessing + } /// /// The runspace objects will be created using OpenAsync. @@ -252,7 +252,7 @@ protected override void ProcessRecord() remoteRunspaces = new List(); // added to avoid prefast warning } break; - } // switch (ParameterSetName... + } foreach (RemoteRunspace remoteRunspace in remoteRunspaces) { @@ -284,7 +284,7 @@ protected override void ProcessRecord() foreach (object streamObject in streamObjects) { WriteStreamObject((Action)streamObject); - } // foreach + } }// ProcessRecord() /// @@ -311,7 +311,7 @@ protected override void EndProcessing() { break; } - } // while ... + } }// EndProcessing() /// @@ -593,7 +593,7 @@ private void HandleRunspaceStateChanged(object sender, OperationStateEventArgs s } break; }// switch - } // HandleRunspaceStateChanged + } /// /// Creates the remote runspace objects when PSSession @@ -698,10 +698,10 @@ private List CreateRunspacesWhenRunspaceParameterSpecified() } ++rsIndex; - } // foreach + } return remoteRunspaces; - } // CreateRunspacesWhenRunspaceParameterSpecified + } /// /// Creates the remote runspace objects when the URI parameter @@ -762,10 +762,10 @@ private List CreateRunspacesWhenUriParameterSpecified() { WriteErrorCreateRemoteRunspaceFailed(e, ConnectionUri[i]); } - } // for... + } return remoteRunspaces; - } // CreateRunspacesWhenUriParameterSpecified + } /// /// Creates the remote runspace objects when the ComputerName parameter @@ -1178,7 +1178,7 @@ protected void Dispose(bool disposing) _stream.Dispose(); } - } // Dispose + } /// /// Handles the throttling complete event of the throttle manager @@ -1191,7 +1191,7 @@ private void HandleThrottleComplete(object sender, EventArgs eventArgs) _stream.ObjectWriter.Close(); _operationsComplete.Set(); - } // HandleThrottleComplete + } /// /// Writes an error record specifying that creation of remote runspace @@ -1216,7 +1216,7 @@ private void WriteErrorCreateRemoteRunspaceFailed(Exception e, Uri uri) cmdlet.WriteError(errorRecord); }; writer.Write(errorWriter); - } // WriteErrorCreateRemoteRunspaceFailed + } #endregion Private Methods @@ -1282,7 +1282,7 @@ internal override void StartOperation() _startComplete = false; } OperatedRunspace.OpenAsync(); - } // StartOperation + } /// /// Closes the runspace already opened asynchronously @@ -1437,7 +1437,7 @@ public void Dispose() GC.SuppressFinalize(this); } - } // OpenRunspaceOperation + } #endregion Helper Classes }//End namespace diff --git a/src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs b/src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs index c9287dd0a85..95a2bf17cbb 100644 --- a/src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs +++ b/src/System.Management.Automation/engine/remoting/common/RemoteSessionNamedPipe.cs @@ -623,7 +623,7 @@ public void StartListening( listenerThread.Name = _threadName; listenerThread.IsBackground = true; listenerThread.Start(clientConnectCallback); - } // Lock _syncObject. + } } #endregion diff --git a/src/System.Management.Automation/engine/remoting/common/throttlemanager.cs b/src/System.Management.Automation/engine/remoting/common/throttlemanager.cs index bdd323ccc06..7fde5c0a7cc 100644 --- a/src/System.Management.Automation/engine/remoting/common/throttlemanager.cs +++ b/src/System.Management.Automation/engine/remoting/common/throttlemanager.cs @@ -166,7 +166,7 @@ internal void RaiseRunspaceDebugStopEvent(System.Management.Automation.Runspaces #endregion - } // IThrottleOperation + } #endregion IThrottleOperation @@ -251,7 +251,7 @@ internal void SubmitOperations(List operations) // schedule operations here if possible StartOperationsFromQueue(); - } // SubmitOperations + } /// /// Add a single operation to the queue @@ -304,7 +304,7 @@ internal void StopAllOperations() { needToReturn = true; } - } // lock ... + } if (needToReturn) { @@ -346,8 +346,8 @@ internal void StopAllOperations() _stopOperationQueue.Add(operation); operation.IgnoreStop = true; - } // foreach... - } // lock... + } + } foreach (IThrottleOperation operation in startOperationsInProcessArray) { @@ -357,7 +357,7 @@ internal void StopAllOperations() // Raise event as it can be that at this point, all operations are // complete RaiseThrottleManagerEvents(); - } // StopAllOperations + } /// /// Stop the specified operation @@ -415,7 +415,7 @@ internal void EndSubmitOperations() } RaiseThrottleManagerEvents(); - } // EndSubmitOperations + } #endregion Public (internal) Methods @@ -508,7 +508,7 @@ private void OperationCompleteHandler(object source, OperationStateEventArgs sta // Do necessary things for starting operation for the next item in the queue StartOneOperationFromQueue(); - } // OperationCompleteHandler + } /// /// Method used to start the operation on one item in the queue @@ -560,7 +560,7 @@ private void StartOperationsFromQueue() StartOneOperationFromQueue(); } } - } // StartOperationsFromQueue + } /// /// Raise the throttle manager events once the conditions are met @@ -586,7 +586,7 @@ private void RaiseThrottleManagerEvents() { ThrottleComplete.SafeInvoke(this, EventArgs.Empty); } - } // RaiseThrottleManagerEvents + } #endregion Private Methods @@ -656,7 +656,7 @@ private void Dispose(bool disposing) { StopAllOperations(); } - } // Dispose + } #endregion IDisposable Overrides } diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs index 27aa366dd3b..da65638603a 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManPlugin.cs @@ -1613,4 +1613,4 @@ internal static void ReportOperationComplete( #endregion } -} // namespace System.Management.Automation.Remoting +} diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManPluginFacade.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManPluginFacade.cs index 9c0c45bd841..65dffd09c68 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManPluginFacade.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManPluginFacade.cs @@ -824,4 +824,4 @@ public IntPtr GetEntryDelegate() #endregion } -} // namespace System.Management.Automation.Remoting +} diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManPluginTransportManager.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManPluginTransportManager.cs index 4f562912df0..eaf52e57155 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManPluginTransportManager.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManPluginTransportManager.cs @@ -408,4 +408,4 @@ private void OnPowershellGuidReported(object src, System.EventArgs args) this.PowerShellGuidObserver -= new System.EventHandler(this.OnPowershellGuidReported); } } -} // namespace System.Management.Automation.Remoting +} diff --git a/src/System.Management.Automation/engine/remoting/server/ServerPowerShellDriver.cs b/src/System.Management.Automation/engine/remoting/server/ServerPowerShellDriver.cs index 906a3d81731..0c2158c03a2 100644 --- a/src/System.Management.Automation/engine/remoting/server/ServerPowerShellDriver.cs +++ b/src/System.Management.Automation/engine/remoting/server/ServerPowerShellDriver.cs @@ -555,7 +555,7 @@ private void HandleOutputDataAdded(object sender, DataAddedEventArgs e) // send the output data to the client DataStructureHandler.SendOutputDataToClient(data); } - } // lock .. + } } /// @@ -580,7 +580,7 @@ private void HandleErrorDataAdded(object sender, DataAddedEventArgs e) // send the error record to the client DataStructureHandler.SendErrorRecordToClient(errorRecord); } - } // lock ... + } } /// @@ -605,7 +605,7 @@ private void HandleProgressAdded(object sender, DataAddedEventArgs eventArgs) // send the output data to the client DataStructureHandler.SendProgressRecordToClient(data); } - } // lock .. + } } /// @@ -630,7 +630,7 @@ private void HandleWarningAdded(object sender, DataAddedEventArgs eventArgs) // send the output data to the client DataStructureHandler.SendWarningRecordToClient(data); } - } // lock .. + } } /// @@ -655,7 +655,7 @@ private void HandleVerboseAdded(object sender, DataAddedEventArgs eventArgs) // send the output data to the client DataStructureHandler.SendVerboseRecordToClient(data); } - } // lock .. + } } /// @@ -680,7 +680,7 @@ private void HandleDebugAdded(object sender, DataAddedEventArgs eventArgs) // send the output data to the client DataStructureHandler.SendDebugRecordToClient(data); } - } // lock .. + } } /// @@ -705,7 +705,7 @@ private void HandleInformationAdded(object sender, DataAddedEventArgs eventArgs) // send the output data to the client DataStructureHandler.SendInformationRecordToClient(data); } - } // lock .. + } } /// diff --git a/src/System.Management.Automation/engine/remoting/server/ServerRemotingProtocol2.cs b/src/System.Management.Automation/engine/remoting/server/ServerRemotingProtocol2.cs index 84395cdf502..bb45a263cea 100644 --- a/src/System.Management.Automation/engine/remoting/server/ServerRemotingProtocol2.cs +++ b/src/System.Management.Automation/engine/remoting/server/ServerRemotingProtocol2.cs @@ -184,7 +184,7 @@ internal void ProcessReceivedData(RemoteDataObject receivedData) ResetRunspaceState.SafeInvoke(this, new RemoteDataEventArgs(receivedData.Data)); } break; - } // switch... + } } /// @@ -651,7 +651,7 @@ internal void ProcessReceivedData(RemoteDataObject receivedData) HostResponseReceived.SafeInvoke(this, new RemoteDataEventArgs(remoteHostResponse)); } break; - } // switch ... + } } /// diff --git a/src/System.Management.Automation/engine/remoting/server/serverremotesessionstatemachine.cs b/src/System.Management.Automation/engine/remoting/server/serverremotesessionstatemachine.cs index 2977963c1e7..09171d79fdf 100644 --- a/src/System.Management.Automation/engine/remoting/server/serverremotesessionstatemachine.cs +++ b/src/System.Management.Automation/engine/remoting/server/serverremotesessionstatemachine.cs @@ -986,7 +986,7 @@ private void HandleKeyExchangeTimeout(object sender) new PSRemotingDataStructureException(RemotingErrorIdStrings.ServerKeyExchangeFailed); RaiseEvent(new RemoteSessionStateMachineEventArgs(RemoteSessionEvent.KeyReceiveFailed, exception)); - } // SetStateHandler + } #endregion Event Handlers diff --git a/src/System.Management.Automation/engine/scriptparameterbinder.cs b/src/System.Management.Automation/engine/scriptparameterbinder.cs index d61567a2827..8dd08be1c04 100644 --- a/src/System.Management.Automation/engine/scriptparameterbinder.cs +++ b/src/System.Management.Automation/engine/scriptparameterbinder.cs @@ -133,7 +133,7 @@ internal override void BindParameter(string name, object value, CompiledCommandP // to do so again. variable.AddParameterAttributesNoChecks(runtimeDefinedParameter.Attributes); } - } // BindParameter + } /// /// Return the default value of a script parameter, evaluating the parse tree if necessary. @@ -165,5 +165,5 @@ internal object GetDefaultScriptParameterValue(RuntimeDefinedParameter parameter internal SessionStateScope LocalScope { get; set; } #endregion private members - } // ScriptParameterBinder -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/engine/serialization.cs b/src/System.Management.Automation/engine/serialization.cs index 2bed070ffa8..19e2c17c658 100644 --- a/src/System.Management.Automation/engine/serialization.cs +++ b/src/System.Management.Automation/engine/serialization.cs @@ -1131,7 +1131,7 @@ private bool HandleSecureString(object source, string streamName, string propert { // do nothing } - } // if (source ... + } } return false; diff --git a/src/System.Management.Automation/namespaces/AliasProvider.cs b/src/System.Management.Automation/namespaces/AliasProvider.cs index 14db7b33f30..f3c689bfa42 100644 --- a/src/System.Management.Automation/namespaces/AliasProvider.cs +++ b/src/System.Management.Automation/namespaces/AliasProvider.cs @@ -36,7 +36,7 @@ public sealed class AliasProvider : SessionStateProviderBase /// public AliasProvider() { - } // constructor + } #endregion Constructor @@ -63,7 +63,7 @@ protected override Collection InitializeDefaultDrives() Collection drives = new Collection(); drives.Add(aliasDrive); return drives; - } // InitializeDefaultDrives + } #endregion DriveCmdletProvider overrides @@ -130,7 +130,7 @@ internal override object GetSessionStateItem(string name) AliasInfo value = SessionState.Internal.GetAlias(name, Context.Origin); return value; - } // GetSessionStateItem + } /// /// Since items are often more than their value, this method should @@ -160,7 +160,7 @@ internal override object GetValueOfItem(object item) value = aliasInfo.Definition; } return value; - } // GetValueOfItem + } /// /// Sets the alias of the specified name to the specified value @@ -248,7 +248,7 @@ internal override void SetSessionStateItem(string name, object value, bool write { WriteItemObject(item, item.Name, false); } - } // SetSessionStateItem + } #pragma warning restore 0162 /// @@ -264,7 +264,7 @@ internal override void RemoveSessionStateItem(string name) "The caller should verify this parameter"); SessionState.Internal.RemoveAlias(name, Force); - } // RemoveSessionStateItem + } /// /// Gets a flattened view of the alias in session state @@ -276,7 +276,7 @@ internal override void RemoveSessionStateItem(string name) internal override IDictionary GetSessionStateTable() { return (IDictionary)SessionState.Internal.GetAliasTable(); - } // GetSessionStateTable + } /// /// Determines if the item can be renamed. Derived classes that need @@ -315,7 +315,7 @@ internal override bool CanRenameItem(object item) } #endregion protected members - } // AliasProvider + } /// /// The dynamic parameter object for the AliasProvider SetItem and NewItem commands diff --git a/src/System.Management.Automation/namespaces/ContainerProviderBase.cs b/src/System.Management.Automation/namespaces/ContainerProviderBase.cs index 3702f3509d5..991f0f3cf9a 100644 --- a/src/System.Management.Automation/namespaces/ContainerProviderBase.cs +++ b/src/System.Management.Automation/namespaces/ContainerProviderBase.cs @@ -65,7 +65,7 @@ internal void GetChildItems( // Call virtual method GetChildItems(path, recurse, depth); - } // GetChildItems + } /// /// Gives the provider to attach additional parameters to @@ -97,7 +97,7 @@ internal object GetChildItemsDynamicParameters( { Context = context; return GetChildItemsDynamicParameters(path, recurse); - } // GetChildItemsDynamicParameters + } /// /// Internal wrapper for the GetChildNames protected method. It is called instead @@ -133,7 +133,7 @@ internal void GetChildNames( // Call virtual method GetChildNames(path, returnContainers); - } // GetChildNames + } /// /// Gets a new provider-specific path and filter (if any) that corresponds to the given @@ -211,7 +211,7 @@ internal object GetChildNamesDynamicParameters( { Context = context; return GetChildNamesDynamicParameters(path); - } // GetChildItemsNamesDynamicParameters + } /// /// Internal wrapper for the RenameItem protected method. It is called instead @@ -242,7 +242,7 @@ internal void RenameItem( // Call virtual method RenameItem(path, newName); - } // RenameItem + } /// /// Gives the provider to attach additional parameters to @@ -270,7 +270,7 @@ internal object RenameItemDynamicParameters( { Context = context; return RenameItemDynamicParameters(path, newName); - } // RenameItemDynamicParameters + } /// /// Internal wrapper for the New protected method. It is called instead @@ -305,7 +305,7 @@ internal void NewItem( // Call virtual method NewItem(path, type, newItemValue); - } // NewItem + } /// /// Gives the provider to attach additional parameters to @@ -337,7 +337,7 @@ internal object NewItemDynamicParameters( { Context = context; return NewItemDynamicParameters(path, type, newItemValue); - } // NewItemDynamicParameters + } /// /// Internal wrapper for the Remove protected method. It is called instead @@ -365,7 +365,7 @@ internal void RemoveItem( // Call virtual method RemoveItem(path, recurse); - } // Remove + } /// /// Gives the provider to attach additional parameters to @@ -394,7 +394,7 @@ internal object RemoveItemDynamicParameters( { Context = context; return RemoveItemDynamicParameters(path, recurse); - } // RemoveItemDynamicParameters + } /// /// Internal wrapper for the HasChildItems protected method. It is called instead @@ -423,7 +423,7 @@ internal bool HasChildItems(string path, CmdletProviderContext context) // Call virtual method return HasChildItems(path); - } // HasChildItems + } /// /// Internal wrapper for the Copy protected method. It is called instead @@ -457,7 +457,7 @@ internal void CopyItem( // Call virtual method CopyItem(path, copyPath, recurse); - } // CopyItem + } /// /// Gives the provider to attach additional parameters to @@ -488,7 +488,7 @@ internal object CopyItemDynamicParameters( { Context = context; return CopyItemDynamicParameters(path, destination, recurse); - } // CopyItemDynamicParameters + } #endregion Internal members @@ -619,7 +619,7 @@ protected virtual object GetChildItemsDynamicParameters(string path, bool recurs { return null; } - } // GetChildItemsDynamicParameters + } /// /// Gets names of the children of the specified path. @@ -738,7 +738,7 @@ protected virtual object GetChildNamesDynamicParameters(string path) { return null; } - } // GetChildNamesDynamicParameters + } /// /// Renames the item at the specified path to the new name provided. @@ -808,7 +808,7 @@ protected virtual object RenameItemDynamicParameters(string path, string newName { return null; } - } // RenameItemDynamicParameters + } /// /// Creates a new item at the specified path. @@ -889,7 +889,7 @@ protected virtual object NewItemDynamicParameters( { return null; } - } // NewItemDynamicParameters + } /// /// Removes (deletes) the item at the specified path @@ -963,7 +963,7 @@ protected virtual object RemoveItemDynamicParameters( { return null; } - } // RemoveItemDynamicParameters + } /// /// Determines if the item at the specified path has children. @@ -1077,11 +1077,11 @@ protected virtual object CopyItemDynamicParameters( { return null; } - } // CopyItemDynamicParameters + } #endregion Protected members - } // ContainerCmdletProvider + } #endregion ContainerCmdletProvider -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/namespaces/CoreCommandContext.cs b/src/System.Management.Automation/namespaces/CoreCommandContext.cs index 9d4e9689c41..52b36cb450f 100644 --- a/src/System.Management.Automation/namespaces/CoreCommandContext.cs +++ b/src/System.Management.Automation/namespaces/CoreCommandContext.cs @@ -64,7 +64,7 @@ internal CmdletProviderContext(ExecutionContext executionContext) { _command = (Cmdlet)executionContext.CurrentCommandProcessor.Command; } - } // CmdletProviderContext constructor + } /// /// Constructs the context under which the core command providers @@ -88,7 +88,7 @@ internal CmdletProviderContext(ExecutionContext executionContext, CommandOrigin ExecutionContext = executionContext; Origin = origin; - } // CmdletProviderContext constructor + } /// /// Constructs the context under which the core command providers @@ -145,7 +145,7 @@ internal CmdletProviderContext( PassThru = true; _streamErrors = true; - } // CmdletProviderContext constructor + } /// /// Constructs the context under which the core command providers @@ -196,7 +196,7 @@ internal CmdletProviderContext( PassThru = true; _streamErrors = true; - } // CmdletProviderContext constructor + } /// /// Constructs the context under which the core command providers @@ -233,7 +233,7 @@ internal CmdletProviderContext( PassThru = true; _streamErrors = true; - } // CmdletProviderContext constructor + } /// /// Constructs the context under which the core command providers @@ -280,7 +280,7 @@ internal CmdletProviderContext( contextToCopyFrom.StopReferrals.Add(this); _copiedContext = contextToCopyFrom; - } // CmdletProviderContext constructor + } #endregion Constructor @@ -360,13 +360,13 @@ internal System.Management.Automation.Provider.CmdletProvider ProviderInstance get { return _providerInstance; - } // get + } set { _providerInstance = value; - } // set - } // ProviderInstance + } + } /// /// Copies the include, exclude, and provider filters from @@ -384,7 +384,7 @@ private void CopyFilters(CmdletProviderContext context) Include = context.Include; Exclude = context.Exclude; Filter = context.Filter; - } // CopyFilters + } internal void RemoveStopReferral() { @@ -452,7 +452,7 @@ internal PSCredential Credential return result; } - } // Credential + } #region Transaction Support @@ -568,7 +568,7 @@ internal bool ShouldProcess( } return result; - } // ShouldProcess + } /// /// Confirm the operation with the user @@ -595,7 +595,7 @@ internal bool ShouldProcess( } return result; - } // ShouldProcess + } /// /// Confirm the operation with the user @@ -638,7 +638,7 @@ internal bool ShouldProcess( } return result; - } // ShouldProcess + } /// /// Confirm the operation with the user @@ -693,7 +693,7 @@ internal bool ShouldProcess( } return result; - } // ShouldProcess + } /// /// Ask the user whether to continue/stop or break to a subshell @@ -720,7 +720,7 @@ internal bool ShouldContinue( } return result; - } // ShouldContinue + } /// /// Ask the user whether to continue/stop or break to a subshell @@ -761,7 +761,7 @@ internal bool ShouldContinue( } return result; - } // ShouldContinue + } /// /// Writes the object to the Verbose pipe. @@ -775,7 +775,7 @@ internal void WriteVerbose(string text) { _command.WriteVerbose(text); } - } // WriteVerbose + } /// /// Writes the object to the Warning pipe. @@ -789,7 +789,7 @@ internal void WriteWarning(string text) { _command.WriteWarning(text); } - } // WriteWarning + } internal void WriteProgress(ProgressRecord record) { @@ -797,7 +797,7 @@ internal void WriteProgress(ProgressRecord record) { _command.WriteProgress(record); } - } // WriteProgress + } /// /// Writes a debug string. @@ -811,7 +811,7 @@ internal void WriteDebug(string text) { _command.WriteDebug(text); } - } // WriteDebug + } internal void WriteInformation(InformationRecord record) { @@ -819,7 +819,7 @@ internal void WriteInformation(InformationRecord record) { _command.WriteInformation(record); } - } // WriteInformation + } internal void WriteInformation(Object messageData, string[] tags) { @@ -827,7 +827,7 @@ internal void WriteInformation(Object messageData, string[] tags) { _command.WriteInformation(messageData, tags); } - } // WriteInformation + } #endregion User feedback mechanisms @@ -854,7 +854,7 @@ internal void SetFilters(Collection include, Collection exclude, Include = include; Exclude = exclude; Filter = filter; - } // SetFilters + } /// /// Gets an array of the objects that have been accumulated @@ -874,7 +874,7 @@ internal Collection GetAccumulatedObjects() // Return the array return results; - } // GetAccumulatedObjects + } /// /// Gets an array of the error objects that have been accumulated @@ -894,7 +894,7 @@ internal Collection GetAccumulatedErrorObjects() // Return the array return results; - } // GetAccumulatedErrorObjects + } /// /// If there are any errors accumulated, the first error is thrown. @@ -1062,7 +1062,7 @@ internal void WriteObject(object obj) _accumulatedObjects.Add(newObj); } - } // WriteObject + } /// /// Writes the error to the pipeline or accumulates the error in an internal @@ -1126,7 +1126,7 @@ internal void WriteError(ErrorRecord errorRecord) Severity.Warning); } } - } // WriteError + } /// /// If the error pipeline hasn't been supplied a delegate or a command then this method @@ -1138,7 +1138,7 @@ internal void WriteError(ErrorRecord errorRecord) internal bool HasErrors() { return _accumulatedErrorObjects != null && _accumulatedErrorObjects.Count > 0; - } // HasErrors + } /// /// Call this on a separate thread when a provider is using @@ -1164,7 +1164,7 @@ internal void StopProcessing() { referralContext.StopProcessing(); } - } // StopProcessing + } internal bool Stopping { get; private set; } @@ -1184,6 +1184,6 @@ internal bool HasIncludeOrExclude } #endregion Public methods - } // CmdletProviderContext + } } diff --git a/src/System.Management.Automation/namespaces/DriveProviderBase.cs b/src/System.Management.Automation/namespaces/DriveProviderBase.cs index 750168f068a..e58f24706aa 100644 --- a/src/System.Management.Automation/namespaces/DriveProviderBase.cs +++ b/src/System.Management.Automation/namespaces/DriveProviderBase.cs @@ -54,7 +54,7 @@ internal PSDriveInfo NewDrive(PSDriveInfo drive, CmdletProviderContext context) } return NewDrive(drive); - } // NewDrive + } /// /// Gives the provider to attach additional parameters to @@ -71,7 +71,7 @@ internal object NewDriveDynamicParameters(CmdletProviderContext context) { Context = context; return NewDriveDynamicParameters(); - } // NewDriveDynamicParameters + } /// /// Internal wrapper for the RemoveDrive protected method. It is called instead @@ -91,7 +91,7 @@ internal PSDriveInfo RemoveDrive(PSDriveInfo drive, CmdletProviderContext contex { Context = context; return RemoveDrive(drive); - } // RemoveDrive + } /// /// Internal wrapper for the InitializeDefaultDrives protected method. It is called instead @@ -110,7 +110,7 @@ internal Collection InitializeDefaultDrives(CmdletProviderContext c Context.Drive = null; return InitializeDefaultDrives(); - } // InitializeDefaultDrives + } #endregion DriveCmdletProvider method wrappers @@ -154,8 +154,8 @@ protected virtual PSDriveInfo NewDrive(PSDriveInfo drive) using (PSTransactionManager.GetEngineProtectionScope()) { return drive; - } // TraceMethod - } // NewDrive + } + } /// /// Gives the provider an opportunity to attach additional parameters to @@ -174,7 +174,7 @@ protected virtual object NewDriveDynamicParameters() { return null; } - } // NewDriveDynamicParameters + } /// /// Gives the provider an opportunity to clean up any provider specific data @@ -199,8 +199,8 @@ protected virtual PSDriveInfo RemoveDrive(PSDriveInfo drive) using (PSTransactionManager.GetEngineProtectionScope()) { return drive; - } // TraceMethod - } // RemoveDrive + } + } /// /// Gives the provider the ability to map drives after initialization. @@ -229,12 +229,12 @@ protected virtual Collection InitializeDefaultDrives() using (PSTransactionManager.GetEngineProtectionScope()) { return new Collection(); - } // TraceMethod - } // InitializeDefaultDrives + } + } #endregion Public methods - } // DriveCmdletProvider + } #endregion DriveCmdletProvider -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/namespaces/EnvironmentProvider.cs b/src/System.Management.Automation/namespaces/EnvironmentProvider.cs index 344274461e8..a251b7b9227 100644 --- a/src/System.Management.Automation/namespaces/EnvironmentProvider.cs +++ b/src/System.Management.Automation/namespaces/EnvironmentProvider.cs @@ -32,7 +32,7 @@ public sealed class EnvironmentProvider : SessionStateProviderBase /// public EnvironmentProvider() { - } // constructor + } #endregion Constructor @@ -59,7 +59,7 @@ protected override Collection InitializeDefaultDrives() Collection drives = new Collection(); drives.Add(envDrive); return drives; - } // InitializeDefaultDrives + } #endregion DriveCmdletProvider overrides @@ -89,7 +89,7 @@ internal override object GetSessionStateItem(string name) result = new DictionaryEntry(name, value); } return result; - } // GetSessionStateItem + } /// /// Sets the environment variable of the specified name to the specified value @@ -141,7 +141,7 @@ internal override void SetSessionStateItem(string name, object value, bool write WriteItemObject(item, name, false); } } - } // SetSessionStateItem + } /// /// Removes the specified environment variable from session state. @@ -156,7 +156,7 @@ internal override void RemoveSessionStateItem(string name) "The caller should verify this parameter"); Environment.SetEnvironmentVariable(name, null); - } // RemoveSessionStateItem + } /// /// Gets a flattened view of the environment variables in session state @@ -211,7 +211,7 @@ internal override IDictionary GetSessionStateTable() } return providerTable; - } // GetSessionStateTable + } /// /// Gets the Value property of the DictionaryEntry item @@ -235,9 +235,9 @@ internal override object GetValueOfItem(object item) value = ((DictionaryEntry)item).Value; } return value; - } // GetValueOfItem + } #endregion protected members - } // EnvironmentProvider + } } diff --git a/src/System.Management.Automation/namespaces/FileSystemContentStream.cs b/src/System.Management.Automation/namespaces/FileSystemContentStream.cs index a6612c6312b..ad0cfe505dc 100644 --- a/src/System.Management.Automation/namespaces/FileSystemContentStream.cs +++ b/src/System.Management.Automation/namespaces/FileSystemContentStream.cs @@ -770,7 +770,7 @@ private bool ReadByteEncoded(bool waitChanges, ArrayList blocks, bool readBack) } else return false; - } // Read + } private void CreateStreams(string filePath, string streamName, FileMode fileMode, FileAccess fileAccess, FileShare fileShare, Encoding fileEncoding) { @@ -969,7 +969,7 @@ public void Seek(long offset, SeekOrigin origin) if (_writer != null) { _writer.Flush(); } if (_reader != null) { _reader.DiscardBufferedData(); } if (_backReader != null) { _backReader.DiscardBufferedData(); } - } // Seek + } /// /// Closes the file. @@ -1014,7 +1014,7 @@ public void Close() { File.SetAttributes(_path, _oldAttributes); } - } // Close + } /// /// Writes the specified object to the file @@ -1043,7 +1043,7 @@ public IList Write(IList content) } } return content; - } // Write + } private void WriteObject(object content) { @@ -1076,7 +1076,7 @@ private void WriteObject(object content) _writer.WriteLine(content.ToString()); } } - } // WriteObject + } /// /// Closes the file stream @@ -1085,7 +1085,7 @@ public void Dispose() { Dispose(true); GC.SuppressFinalize(this); - } // Dispose + } internal void Dispose(bool isDisposing) { @@ -1101,7 +1101,7 @@ internal void Dispose(bool isDisposing) _writer.Dispose(); } } - } // class FileSystemContentStream + } internal sealed class FileStreamBackReader : StreamReader { @@ -1524,4 +1524,4 @@ internal BackReaderEncodingNotSupportedException(string encodingName) /// internal string EncodingName { get; } } -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/namespaces/FileSystemProvider.cs b/src/System.Management.Automation/namespaces/FileSystemProvider.cs index 8267c5e7a7f..eb09acebc3b 100644 --- a/src/System.Management.Automation/namespaces/FileSystemProvider.cs +++ b/src/System.Management.Automation/namespaces/FileSystemProvider.cs @@ -99,7 +99,7 @@ public FileSystemProvider() private static string NormalizePath(string path) { return path.Replace(StringLiterals.AlternatePathSeparator, StringLiterals.DefaultPathSeparator); - } // NormalizePath + } /// /// Checks if the item exist at the specified path. if it exists then creates @@ -372,7 +372,7 @@ protected override ProviderInfo Start(ProviderInfo providerInfo) } } return providerInfo; - } // Start + } #endregion CmdletProvider members @@ -473,7 +473,7 @@ protected override PSDriveInfo NewDrive(PSDriveInfo drive) drive.Trace(); return result; - } // NewDrive + } /// /// MapNetworkDrive facilitates to map the newly created PS Drive to a network share. @@ -993,10 +993,10 @@ protected override Collection InitializeDefaultDrives() catch (System.UnauthorizedAccessException) { } - } // foreach + } } return results; - } // InitializeDefaultDrives + } #endregion DriveCmdletProvider methods @@ -1204,7 +1204,7 @@ protected override void GetItem(string path) { WriteError(new ErrorRecord(accessException, "GetItemUnauthorizedAccessError", ErrorCategory.PermissionDenied, path)); } - } // GetItem + } private FileSystemInfo GetFileSystemItem(string path, ref bool isContainer, bool showHidden) { @@ -1269,7 +1269,7 @@ private FileSystemInfo GetFileSystemItem(string path, ref bool isContainer, bool } } return null; - } // GetFileSystemItem + } /// /// Invokes the item at the path using ShellExecute semantics. @@ -1330,7 +1330,7 @@ protected override void InvokeDefaultAction(string path) invokeProcess.Start(); #endif } - } // InvokeDefaultAction + } #endregion ItemCmdletProvider members @@ -1362,7 +1362,7 @@ protected override void GetChildItems( uint depth) { GetPathItems(path, recurse, depth, false, ReturnContainers.ReturnMatchingContainers); - } // GetChildItems + } #endregion GetChildItems #region GetChildNames @@ -1388,7 +1388,7 @@ protected override void GetChildNames( ReturnContainers returnContainers) { GetPathItems(path, false, uint.MaxValue, true, returnContainers); - } // GetChildNames + } #endregion GetChildNames /// @@ -1765,7 +1765,7 @@ private void Dir( // 2004/10/13-JonN removed ResourceActionFailedException wrapper WriteError(new ErrorRecord(uae, "DirUnauthorizedAccessError", ErrorCategory.PermissionDenied, directory.FullName)); } - } // Dir + } /// /// Create an enum expression evaluator for user-specified attribute filtering @@ -1980,7 +1980,7 @@ protected override void RenameItem( { WriteError(new ErrorRecord(accessException, "RenameItemUnauthorizedAccessError", ErrorCategory.PermissionDenied, path)); } - } // RenameItem + } #endregion RenameItem @@ -2416,7 +2416,7 @@ protected override void NewItem( { throw PSTraceSource.NewArgumentException("type", FileSystemProviderStrings.UnknownType); } - } // NewItem + } private static bool WinCreateSymbolicLink(string path, string strTargetPath, bool isDirectory) { @@ -2558,7 +2558,7 @@ private void CreateDirectory(string path, bool streamOutput) { WriteError(new ErrorRecord(accessException, "CreateDirectoryUnauthorizedAccessError", ErrorCategory.PermissionDenied, path)); } - } // CreateDirectory + } private bool CreateIntermediateDirectories(string path) { @@ -2634,7 +2634,7 @@ private bool CreateIntermediateDirectories(string path) } return result; - } // CreateIntermediateDirectories + } #endregion NewItem @@ -2774,7 +2774,7 @@ protected override void RemoveItem(string path, bool recurse) { WriteError(new ErrorRecord(accessException, "RemoveItemUnauthorizedAccessError", ErrorCategory.PermissionDenied, path)); } - } // RemoveItem + } /// /// Retrieves the dynamic parameters required for the Remove-Item cmdlet @@ -2912,8 +2912,8 @@ private void RemoveDirectoryInfoItem(DirectoryInfo directory, bool recurse, bool // Finally, remove the directory RemoveFileSystemItem(directory, force); } - } // ShouldProcess - } // RemoveDirectoryInfoItem + } + } /// /// Removes a file from the file system. @@ -2936,8 +2936,8 @@ private void RemoveFileInfoItem(FileInfo file, bool force) if (ShouldProcess(file.FullName, action)) { RemoveFileSystemItem(file, force); - } // ShouldProcess - } // RemoveFileInfoItem + } + } /// /// Removes the file system object from the file system. @@ -3069,7 +3069,7 @@ private void RemoveFileSystemItem(FileSystemInfo fileSystemInfo, bool force) } } } - } // RemoveFileSystemItem + } #endregion RemoveItem @@ -3174,7 +3174,7 @@ private bool ItemExists(string path, out ErrorRecord error) } return result; - } // Exists + } /// /// Adds -OlderThan, -NewerThan dynamic properties. @@ -3196,7 +3196,7 @@ protected override object ItemExistsDynamicParameters(string path) { return new FileSystemItemProviderDynamicParameters(); } - } // ItemExistsDynamicParameters + } #endregion ItemExists @@ -3279,7 +3279,7 @@ protected override bool HasChildItems(string path) } return result; - } // HasChildItems + } private static bool DirectoryInfoHasChildItems(DirectoryInfo directory) { @@ -3297,7 +3297,7 @@ private static bool DirectoryInfoHasChildItems(DirectoryInfo directory) } return result; - } // DirectoryInfoHasChildItems + } #endregion HasChildItems @@ -3474,7 +3474,7 @@ private void CopyItemFromRemoteSession(string path, string destinationPath, bool RemoveFunctionsPSCopyFileFromRemoteSession(ps); } } - } // CopyItemFromRemoteSession + } private void CopyItemLocalOrToSession(string path, string destinationPath, bool recurse, bool Force, System.Management.Automation.PowerShell ps) { @@ -3505,7 +3505,7 @@ private void CopyItemLocalOrToSession(string path, string destinationPath, bool { RemoveFunctionPSCopyFileToRemoteSession(ps); } - } // CopyItem + } private void CopyDirectoryInfoItem( DirectoryInfo directory, @@ -3621,7 +3621,7 @@ private void CopyDirectoryInfoItem( WriteError(new ErrorRecord(accessException, "CopyDirectoryInfoItemUnauthorizedAccessError", ErrorCategory.PermissionDenied, file)); } } - } // for files + } // Now copy all the directories to that directory @@ -3653,10 +3653,10 @@ private void CopyDirectoryInfoItem( WriteError(new ErrorRecord(accessException, "CopyDirectoryInfoItemUnauthorizedAccessError", ErrorCategory.PermissionDenied, childDir)); } } - } // for directories + } } - } // ShouldProcess - } // CopyDirectoryInfoItem + } + } private void CopyFileInfoItem(FileInfo file, string destinationPath, bool force, System.Management.Automation.PowerShell ps) { @@ -3761,15 +3761,15 @@ private void CopyFileInfoItem(FileInfo file, string destinationPath, bool force, FileInfo result = new FileInfo(destinationPath); WriteItemObject(result, destinationPath, false); - } // force + } else { WriteError(new ErrorRecord(unAuthorizedAccessException, "CopyFileInfoItemUnauthorizedAccessError", ErrorCategory.PermissionDenied, file)); } } - } // ShouldProcess + } }// ExcludeFile - } // CopyFileInfoItem + } private void CopyDirectoryFromRemoteSession( string sourceDirectoryName, @@ -3852,7 +3852,7 @@ private void CopyDirectoryFromRemoteSession( fileSize); } } - } // for files + } if (op["Directories"] != null) { @@ -3879,10 +3879,10 @@ private void CopyDirectoryFromRemoteSession( recurse, ps); } - } // for directories + } } - } // ShouldProcess - } // CopyDirectoryFromRemoteSession + } + } private ArrayList GetRemoteSourceAlternateStreams(System.Management.Automation.PowerShell ps, string path) { @@ -4049,7 +4049,7 @@ private void CopyFileFromRemoteSession( { SetFileMetadata(sourceFileFullName, destinationFile, ps); } - } // ShouldProcess + } } private bool PerformCopyFileFromRemoteSession(string sourceFileFullName, FileInfo destinationFile, string destinationPath, bool force, System.Management.Automation.PowerShell ps, @@ -4546,7 +4546,7 @@ private bool PerformCopyFileToRemoteSession(FileInfo file, string destinationPat } return result; - } // PerformCopyFileToRemoteSession + } private bool RemoteDestinationPathIsFile(string destination, System.Management.Automation.PowerShell ps) { @@ -4605,7 +4605,7 @@ private string CreateDirectoryOnRemoteSession(string destination, bool force, Sy } return path; - } // CreateDirectoryOnRemoteSession + } // Returns true if the destination path represents a device name, and write an error to the user. private bool PathIsReservedDeviceName(string destinationPath, string errorId) @@ -4655,7 +4655,7 @@ protected override string GetParentPath(string path, string root) } #endif return parentPath; - } // GetParentPath + } // Note: we don't use IO.Path.IsPathRooted as this deals with "invalid" i.e. unnormalized paths private static bool IsAbsolutePath(string path) @@ -4941,7 +4941,7 @@ protected override string NormalizeRelativePath( } while (false); return result; - } // NormalizeRelativePath + } /// /// Normalizes the path that was passed in and returns the normalized path @@ -5131,7 +5131,7 @@ private string NormalizeRelativePathHelper(string path, string basePath) #endif return result; - } // NormalizeRelativePathHelper + } private string RemoveRelativeTokens(string path) { @@ -5246,7 +5246,7 @@ private Stack TokenizePathToStack(string path, string basePath) } return tokenizedPathStack; - } // TokenizePathToStack + } /// /// Given the tokenized path, the relative path elements are removed. @@ -5342,7 +5342,7 @@ private Stack NormalizeThePath(string basepath, Stack tokenizedP } return normalizedPathStack; - } // NormalizeThePath + } /// /// Pops each leaf element of the stack and uses MakePath to generate the relative path @@ -5375,7 +5375,7 @@ private string CreateNormalizedRelativePathFromStack(Stack normalizedPat } } return leafElement; - } // CreateNormalizedRelativePathFromStack + } /// /// Gets the name of the leaf element of the specified path. @@ -5422,7 +5422,7 @@ protected override string GetChildName(string path) } return result; - } // GetChildName + } private static string EnsureDriveIsRooted(string path) { @@ -5444,7 +5444,7 @@ private static string EnsureDriveIsRooted(string path) } return result; - } // EnsureDriveIsRooted + } /// /// Determines if the item at the specified path is a directory. @@ -5590,7 +5590,7 @@ protected override void MoveItem( { WriteError(new ErrorRecord(accessException, "MoveItemUnauthorizedAccessError", ErrorCategory.PermissionDenied, path)); } - } // MoveItem + } private void MoveFileInfoItem( FileInfo file, @@ -5718,7 +5718,7 @@ private void MoveFileInfoItem( WriteError(new ErrorRecord(ioException, "MoveFileInfoItemIOError", ErrorCategory.WriteError, file)); } } - } // MoveFileInfoItem + } private void MoveDirectoryInfoItem( DirectoryInfo directory, @@ -5805,7 +5805,7 @@ private void MoveDirectoryInfoItem( //IOException contains specific message about the error occured and so no need for errordetails. WriteError(new ErrorRecord(ioException, "MoveDirectoryItemIOError", ErrorCategory.WriteError, directory)); } - } // MoveDirectoryItem + } private void CopyAndDelete(DirectoryInfo directory, string destination, bool force) { @@ -5933,7 +5933,7 @@ public void GetProperty(string path, Collection providerSpecificPickList WriteError(new ErrorRecord(exception, "GetValueError", ErrorCategory.ReadError, property)); } } - } // foreach (property in providerSpecificPickList + } } } } @@ -5955,7 +5955,7 @@ public void GetProperty(string path, Collection providerSpecificPickList { WritePropertyObject(result, path); } - } // GetProperty + } /// /// Gets the dynamic property parameters required by the get-itemproperty cmdlet. @@ -6108,8 +6108,8 @@ public void SetProperty(string path, PSObject propertyToSet) Exception e = new IOException(error); WriteError(new ErrorRecord(e, "SetPropertyError", ErrorCategory.ReadError, property)); } - } // ShouldProcess - } // foreach property + } + } if (propertySet) { @@ -6126,7 +6126,7 @@ public void SetProperty(string path, PSObject propertyToSet) ErrorCategory.ObjectNotFound, path)); } - } // SetProperty + } /// /// Gets the dynamic property parameters required by the set-itemproperty cmdlet. @@ -6236,7 +6236,7 @@ public void ClearProperty( // Now write out the attribute that was cleared. WritePropertyObject(result, path); - } // ShouldProcess + } } catch (UnauthorizedAccessException unauthorizedAccessException) { @@ -6251,7 +6251,7 @@ public void ClearProperty( //IOException contains specific message about the error occured and so no need for errordetails. WriteError(new ErrorRecord(ioException, "ClearPropertyIOError", ErrorCategory.WriteError, path)); } - } // ClearProperty + } /// /// Gets the dynamic property parameters required by the clear-itemproperty cmdlet. @@ -6353,8 +6353,8 @@ public IContentReader GetContentReader(string path) // Get the stream name streamName = dynParams.Stream; #endif - } // dynParams != null - } // DynamicParameters != null + } + } #if !UNIX // See if they've used the inline stream syntax. They have more than one colon. @@ -6434,7 +6434,7 @@ public IContentReader GetContentReader(string path) } return stream; - } // GetContentReader + } /// /// Gets the dynamic property parameters required by the get-content cmdlet. @@ -6509,7 +6509,7 @@ public IContentWriter GetContentWriter(string path) streamName = dynParams.Stream; #endif suppressNewline = dynParams.NoNewline.IsPresent; - } // dynParams != null + } } #if !UNIX @@ -6568,7 +6568,7 @@ public IContentWriter GetContentWriter(string path) } return stream; - } // GetContentWriter + } /// /// Gets the dynamic property parameters required by the set-content and @@ -6744,7 +6744,7 @@ public void ClearContent(string path) WriteError(new ErrorRecord(accessException, "ClearContentUnauthorizedAccessError", ErrorCategory.PermissionDenied, path)); } } - } // ClearContent + } /// /// Gets the dynamic property parameters required by the clear-content cmdlet. @@ -7067,7 +7067,7 @@ internal bool TryVisitPath(string path) } #endregion - } // class FileSystemProvider + } internal static class SafeInvokeCommand { @@ -7277,7 +7277,7 @@ public Encoding Encoding /// public bool WasStreamTypeSpecified { get; private set; } - } // class FileSystemContentDynamicParametersBase + } /// /// Defines the dynamic parameters used by the Clear-Content cmdlet. @@ -7354,12 +7354,12 @@ public SwitchParameter Wait get { return _wait; - } // get + } set { _wait = value; - } // set + } } private bool _wait; @@ -7387,8 +7387,8 @@ public SwitchParameter Raw /// public bool DelimiterSpecified { get; private set; // get - } // DelimiterSpecified - } // class FileSystemContentReaderDynamicParameters + } + } /// /// Provides the dynamic parameters for test-path on the file system. @@ -7406,7 +7406,7 @@ public class FileSystemItemProviderDynamicParameters /// [Parameter] public DateTime? NewerThan { get; set; } - } // class FileSystemItemProviderDynamicParameters + } /// /// Provides the dynamic parameters for Get-Item on the file system. @@ -7422,7 +7422,7 @@ public class FileSystemProviderGetItemDynamicParameters [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] public string[] Stream { get; set; } #endif - } // class FileSystemItemProviderDynamicParameters + } /// /// Provides the dynamic parameters for Remove-Item on the file system. @@ -7438,7 +7438,7 @@ public class FileSystemProviderRemoveItemDynamicParameters [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] public string[] Stream { get; set; } #endif - } // class FileSystemItemProviderDynamicParameters + } #endregion diff --git a/src/System.Management.Automation/namespaces/FileSystemSecurity.cs b/src/System.Management.Automation/namespaces/FileSystemSecurity.cs index 3dabf2ea004..3157aa5bd13 100644 --- a/src/System.Management.Automation/namespaces/FileSystemSecurity.cs +++ b/src/System.Management.Automation/namespaces/FileSystemSecurity.cs @@ -198,7 +198,7 @@ public void SetSecurityDescriptor( SetSecurityDescriptor(path, sd, sections); } } - } // SetSecurityDescriptor + } private void SetSecurityDescriptor(string path, ObjectSecurity sd, AccessControlSections sections) { diff --git a/src/System.Management.Automation/namespaces/FunctionProvider.cs b/src/System.Management.Automation/namespaces/FunctionProvider.cs index 96c1ebadce9..d2ac1a838f9 100644 --- a/src/System.Management.Automation/namespaces/FunctionProvider.cs +++ b/src/System.Management.Automation/namespaces/FunctionProvider.cs @@ -37,7 +37,7 @@ public sealed class FunctionProvider : SessionStateProviderBase /// public FunctionProvider() { - } // constructor + } #endregion Constructor @@ -64,7 +64,7 @@ protected override Collection InitializeDefaultDrives() Collection drives = new Collection(); drives.Add(functionDrive); return drives; - } // InitializeDefaultDrives + } #endregion DriveCmdletProvider overrides @@ -131,7 +131,7 @@ internal override object GetSessionStateItem(string name) CommandInfo function = SessionState.Internal.GetFunction(name, Context.Origin); return function; - } // GetSessionStateItem + } /// /// Sets the function of the specified name to the specified value @@ -243,7 +243,7 @@ internal override void SetSessionStateItem(string name, object value, bool write WriteItemObject(modifiedItem, modifiedItem.Name, false); } } - } // SetSessionStateItem + } #pragma warning restore 0162 private static void SetOptions(CommandInfo function, ScopedItemOptions options) @@ -264,7 +264,7 @@ internal override void RemoveSessionStateItem(string name) "The caller should verify this parameter"); SessionState.Internal.RemoveFunction(name, Force); - } // RemoveSessionStateItem + } /// /// Since items are often more than their value, this method should @@ -295,7 +295,7 @@ internal override object GetValueOfItem(object item) } return value; - } // GetValueOfItem + } /// /// Gets a flattened view of the functions in session state @@ -307,7 +307,7 @@ internal override object GetValueOfItem(object item) internal override IDictionary GetSessionStateTable() { return SessionState.Internal.GetFunctionTable(); - } // GetSessionStateTable + } /// /// Determines if the item can be renamed. Derived classes that need @@ -346,7 +346,7 @@ internal override bool CanRenameItem(object item) } #endregion protected members - } // FunctionProvider + } /// /// The dynamic parameter object for the FunctionProvider SetItem and NewItem commands diff --git a/src/System.Management.Automation/namespaces/IContentProvider.cs b/src/System.Management.Automation/namespaces/IContentProvider.cs index 7abe734af45..92c88d7a937 100644 --- a/src/System.Management.Automation/namespaces/IContentProvider.cs +++ b/src/System.Management.Automation/namespaces/IContentProvider.cs @@ -142,8 +142,8 @@ public interface IContentCmdletProvider /// The default implementation returns null. (no additional parameters) /// object ClearContentDynamicParameters(string path); - } // IContentCmdletProvider + } #endregion IContentCmdletProvider -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/namespaces/IContentReader.cs b/src/System.Management.Automation/namespaces/IContentReader.cs index b17b16f8d52..4ca0064f888 100644 --- a/src/System.Management.Automation/namespaces/IContentReader.cs +++ b/src/System.Management.Automation/namespaces/IContentReader.cs @@ -61,8 +61,8 @@ public interface IContentReader : IDisposable /// reader. /// void Close(); - } // IContentReader + } #endregion IContentReader -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/namespaces/IContentWriter.cs b/src/System.Management.Automation/namespaces/IContentWriter.cs index 4b22bb1f726..437a08cfe19 100644 --- a/src/System.Management.Automation/namespaces/IContentWriter.cs +++ b/src/System.Management.Automation/namespaces/IContentWriter.cs @@ -62,8 +62,8 @@ public interface IContentWriter : IDisposable /// writer. /// void Close(); - } // IContentWriter + } #endregion IContentWriter -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/namespaces/IDynamicPropertyProvider.cs b/src/System.Management.Automation/namespaces/IDynamicPropertyProvider.cs index 7a166d809a3..5586ce8c2e6 100644 --- a/src/System.Management.Automation/namespaces/IDynamicPropertyProvider.cs +++ b/src/System.Management.Automation/namespaces/IDynamicPropertyProvider.cs @@ -333,8 +333,8 @@ object MovePropertyDynamicParameters( string sourceProperty, string destinationPath, string destinationProperty); - } // IDynamicPropertyCmdletProvider + } #endregion IDynamicPropertyCmdletProvider -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/namespaces/IPermissionProvider.cs b/src/System.Management.Automation/namespaces/IPermissionProvider.cs index 1603135a5b7..b5adea6644c 100644 --- a/src/System.Management.Automation/namespaces/IPermissionProvider.cs +++ b/src/System.Management.Automation/namespaces/IPermissionProvider.cs @@ -103,7 +103,7 @@ ObjectSecurity NewSecurityDescriptorFromPath( ObjectSecurity NewSecurityDescriptorOfType( string type, AccessControlSections includeSections); - } // ISecurityDescriptorCmdletProvider + } #endregion ISecurityDescriptorCmdletProvider -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/namespaces/IPropertiesProvider.cs b/src/System.Management.Automation/namespaces/IPropertiesProvider.cs index b3614933f3d..f5e331846d9 100644 --- a/src/System.Management.Automation/namespaces/IPropertiesProvider.cs +++ b/src/System.Management.Automation/namespaces/IPropertiesProvider.cs @@ -194,8 +194,8 @@ void ClearProperty( object ClearPropertyDynamicParameters( string path, Collection propertyToClear); - } // IPropertyCmdletProvider + } #endregion IPropertyCmdletProvider -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/namespaces/ItemProviderBase.cs b/src/System.Management.Automation/namespaces/ItemProviderBase.cs index 3485e254cbb..7562c1c58fe 100644 --- a/src/System.Management.Automation/namespaces/ItemProviderBase.cs +++ b/src/System.Management.Automation/namespaces/ItemProviderBase.cs @@ -44,7 +44,7 @@ internal void GetItem(string path, CmdletProviderContext context) // Call virtual method GetItem(path); - } // GetItem + } /// /// Gives the provider to attach additional parameters to @@ -68,7 +68,7 @@ internal object GetItemDynamicParameters(string path, CmdletProviderContext cont { Context = context; return GetItemDynamicParameters(path); - } // GetItemDynamicParameters + } /// /// Internal wrapper for the SetItem protected method. It is called instead @@ -99,7 +99,7 @@ internal void SetItem( // Call virtual method SetItem(path, value); - } // SetItem + } /// /// Gives the provider to attach additional parameters to @@ -129,7 +129,7 @@ internal object SetItemDynamicParameters( { Context = context; return SetItemDynamicParameters(path, value); - } // SetItemDynamicParameters + } /// /// Internal wrapper for the ClearItem protected method. It is called instead @@ -153,7 +153,7 @@ internal void ClearItem( // Call virtual method ClearItem(path); - } // ClearItem + } /// /// Gives the provider to attach additional parameters to @@ -179,7 +179,7 @@ internal object ClearItemDynamicParameters( { Context = context; return ClearItemDynamicParameters(path); - } // ClearItemDynamicParameters + } /// /// Internal wrapper for the InvokeDefaultAction protected method. It is called instead @@ -203,7 +203,7 @@ internal void InvokeDefaultAction( // Call virtual method InvokeDefaultAction(path); - } // InvokeDefaultAction + } /// /// Gives the provider to attach additional parameters to @@ -229,7 +229,7 @@ internal object InvokeDefaultActionDynamicParameters( { Context = context; return InvokeDefaultActionDynamicParameters(path); - } // InvokeDefaultActionDynamicParameters + } /// /// Internal wrapper for the Exists protected method. It is called instead @@ -263,7 +263,7 @@ internal bool ItemExists(string path, CmdletProviderContext context) } return itemExists; - } // Exists + } /// /// Gives the provider to attach additional parameters to @@ -289,7 +289,7 @@ internal object ItemExistsDynamicParameters( { Context = context; return ItemExistsDynamicParameters(path); - } // ItemExistsDynamicParameters + } /// /// Internal wrapper for the IsValidPath protected method. It is called instead @@ -319,7 +319,7 @@ internal bool IsValidPath(string path, CmdletProviderContext context) // Call virtual method return IsValidPath(path); - } // IsValidPath + } /// /// Internal wrapper for the ExpandPath protected method. It is called instead @@ -343,7 +343,7 @@ internal string[] ExpandPath(string path, CmdletProviderContext context) // Call virtual method return ExpandPath(path); - } // IsValidPath + } #endregion internal methods @@ -403,7 +403,7 @@ protected virtual object GetItemDynamicParameters(string path) { return null; } - } // GetItemDynamicParameters + } /// /// Sets the item specified by the path. @@ -467,7 +467,7 @@ protected virtual object SetItemDynamicParameters(string path, object value) { return null; } - } // SetItemDynamicParameters + } /// /// Clears the item specified by the path. @@ -524,7 +524,7 @@ protected virtual object ClearItemDynamicParameters(string path) { return null; } - } // ClearItemDynamicParameters + } /// /// Invokes the default action on the specified item. @@ -582,7 +582,7 @@ protected virtual object InvokeDefaultActionDynamicParameters(string path) { return null; } - } // InvokeDefaultActionDynamicParameters + } /// /// Determines if an item exists at the specified path. @@ -642,7 +642,7 @@ protected virtual object ItemExistsDynamicParameters(string path) { return null; } - } // ItemExistsDynamicParameters + } /// /// Providers must override this method to verify the syntax and semantics @@ -681,11 +681,11 @@ protected virtual string[] ExpandPath(string path) { return new string[] { path }; } - } // IsValidPath + } #endregion Protected methods - } // ItemCmdletProvider + } #endregion ItemCmdletProvider -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/namespaces/LocationGlobber.cs b/src/System.Management.Automation/namespaces/LocationGlobber.cs index ba4b05d420e..5e03ac39194 100644 --- a/src/System.Management.Automation/namespaces/LocationGlobber.cs +++ b/src/System.Management.Automation/namespaces/LocationGlobber.cs @@ -61,7 +61,7 @@ internal LocationGlobber(SessionState sessionState) } _sessionState = sessionState; - } // LocationGlobber(SessionState) + } #endregion Constructor @@ -116,7 +116,7 @@ internal Collection GetGlobbedMonadPathsFromMonadPath( new CmdletProviderContext(_sessionState.Internal.ExecutionContext); return GetGlobbedMonadPathsFromMonadPath(path, allowNonexistingPaths, context, out providerInstance); - } // GetGlobbedMonadPathsFromMonadPath + } /// /// Converts a PowerShell path containing glob characters to PowerShell paths that match @@ -243,7 +243,7 @@ internal Collection GetGlobbedMonadPathsFromMonadPath( } } return result; - } // GetGlobbedMonadPathsFromMonadPath + } private Collection ResolveProviderPathFromProviderPath( string providerPath, @@ -667,7 +667,7 @@ internal Collection GetGlobbedProviderPathsFromMonadPath( new CmdletProviderContext(_sessionState.Internal.ExecutionContext); return GetGlobbedProviderPathsFromMonadPath(path, allowNonexistingPaths, context, out provider, out providerInstance); - } // GetGlobbedProviderPathsFromMonadPath + } /// /// Converts a PowerShell path containing glob characters to the provider @@ -784,7 +784,7 @@ internal Collection GetGlobbedProviderPathsFromMonadPath( return paths; } - } // GetGlobbedProviderPathsFromMonadPath + } #endregion Provider paths from Monad path globbing @@ -871,7 +871,7 @@ internal Collection GetGlobbedProviderPathsFromProviderPath( } } return results; - } // GetGlobbedProviderPathsFromProviderPath + } /// /// Given a provider specific path that contains glob characters, this method @@ -955,7 +955,7 @@ internal Collection GetGlobbedProviderPathsFromProviderPath( context, out providerInstance); } - } // GetGlobbedProviderPathsFromProviderPath + } #endregion Provider path to provider paths globbing @@ -1004,7 +1004,7 @@ internal string GetProviderPath(string path) { ProviderInfo provider = null; return GetProviderPath(path, out provider); - } // GetProviderPath + } /// /// Gets a provider specific path when given an Msh path without resolving the @@ -1076,7 +1076,7 @@ internal string GetProviderPath(string path, out ProviderInfo provider) } return result; - } // GetProviderPath + } /// /// Gets a provider specific path when given an Msh path without resolving the @@ -1134,7 +1134,7 @@ internal string GetProviderPath(string path, CmdletProviderContext context) string result = GetProviderPath(path, context, out provider, out drive); return result; - } // GetProviderPath + } /// /// Returns a provider specific path for given PowerShell path. @@ -1324,7 +1324,7 @@ internal string GetProviderPath( } return result; - } // GetProviderPath + } /// /// Determines if the specified path is a provider. This is done by looking for @@ -1423,7 +1423,7 @@ internal static bool IsProviderQualifiedPath(string path, out string providerId) } while (false); return result; - } // IsProviderQualifiedPath + } /// /// Determines if the given path is absolute while on a single root filesystem. @@ -1447,7 +1447,7 @@ internal static bool IsSingleFileSystemAbsolutePath(string path) #else return false; #endif - } // IsSingleFileSystemAbsolutePath + } /// /// Determines if the given path is relative or absolute @@ -1534,7 +1534,7 @@ internal static bool IsAbsolutePath(string path) } while (false); return result; - } // IsAbsolutePath + } /// /// Determines if the given path is relative or absolute @@ -1637,7 +1637,7 @@ internal bool IsAbsolutePath(string path, out string driveName) #endif return result; - } // IsAbsolutePath + } #endregion Path manipulation @@ -1672,7 +1672,7 @@ private static string RemoveGlobEscaping(string path) string result = WildcardPattern.Unescape(path); return result; - } // RemoveGlobEscaping + } #region Path manipulation methods @@ -1723,7 +1723,7 @@ internal bool IsShellVirtualDrive(string driveName, out SessionStateScope scope) s_tracer.WriteLine("match found: {0}", StringLiterals.Global); result = true; scope = _sessionState.Internal.GlobalScope; - } // globalScope + } // Is it the local scope? @@ -1735,14 +1735,14 @@ internal bool IsShellVirtualDrive(string driveName, out SessionStateScope scope) s_tracer.WriteLine("match found: {0}", driveName); result = true; scope = _sessionState.Internal.CurrentScope; - } // currentScope + } else { scope = null; } return result; - } // IsShellVirtualDrive + } /// /// Gets a provider specific path that represents the specified path and is relative @@ -1946,7 +1946,7 @@ internal string GetDriveRootRelativePathFromPSPath( providerInstance = null; return string.Empty; } - } // GetDriveRootRelativePathFromPSPath + } private string GetDriveRootRelativePathFromProviderPath( string providerPath, @@ -2269,7 +2269,7 @@ internal string GenerateRelativePath( driveRootRelativeWorkingPath); return driveRootRelativeWorkingPath; - } // GenerateRelativePath + } private bool HasRelativePathTokens(string path) { @@ -2351,7 +2351,7 @@ private string GetProviderSpecificPath( } return result; - } // GetProviderSpecificPath + } /// /// Parses the provider-qualified path into the provider name and @@ -2395,7 +2395,7 @@ private static string ParseProviderPath(string path, out string providerId) string result = path.Substring(providerIdSeparatorIndex + StringLiterals.ProviderPathSeparator.Length); return result; - } // ParseProviderPath + } #endregion Path manipulation methods @@ -2477,7 +2477,7 @@ internal Collection GetGlobbedProviderPathsFromProviderPath( context); return expandedPaths; - } // GetGlobbedProviderPathsFromProviderPath + } /// /// Determines if the specified path contains any globing characters. These @@ -2500,7 +2500,7 @@ internal static bool StringContainsGlobCharacters(string path) } return WildcardPattern.ContainsWildcardCharacters(path); - } // StringContainsGlobCharacters + } /// /// Determines if the path and context are such that we need to run through @@ -2545,7 +2545,7 @@ internal static bool ShouldPerformGlobbing(string path, CmdletProviderContext co s_pathResolutionTracer.WriteLine("Path contains wildcard characters: {0}", pathContainsGlobCharacters); return (pathContainsGlobCharacters || contextContainsIncludeExclude) && (!contextContainsNoGlob); - } // ShouldPerformGlobbing + } /// /// Generates an array of provider specific paths from the single provider specific @@ -2866,7 +2866,7 @@ private Collection ExpandMshGlobPath( } } } - } // while (leafElements.Count > 0) + } Dbg.Diagnostics.Assert( dirs != null, @@ -2950,7 +2950,7 @@ private Collection ExpandMshGlobPath( "This method should at least return the path or more if it has glob characters"); return result; - } // ExpandMshGlobPath + } /// /// Gets either a drive-qualified or provider-qualified path based on the drive @@ -2997,7 +2997,7 @@ internal static string GetMshQualifiedPath(string path, PSDriveInfo drive) } return result; - } // GetMshQualifiedPath + } /// /// Removes the provider or drive qualifier from a Msh path. @@ -3034,7 +3034,7 @@ internal static string RemoveMshQualifier(string path, PSDriveInfo drive) } return result; - } // RemoveMshQualifier + } /// /// Given an Msh relative or absolute path, returns a drive-qualified absolute path. @@ -3134,7 +3134,7 @@ internal static string GetDriveQualifiedPath(string path, PSDriveInfo drive) } return result; - } // GetDriveQualifiedPath + } /// /// Removes the drive qualifier from a drive qualified MSH path @@ -3177,7 +3177,7 @@ private static string RemoveDriveQualifier(string path) } return result; - } // RemoveDriveQualifier + } /// /// Given an Msh path, returns a provider-qualified path. @@ -3235,7 +3235,7 @@ internal static string GetProviderQualifiedPath(string path, ProviderInfo provid } return result; - } // GetProviderQualifiedPath + } /// /// Removes the provider qualifier from a provider-qualified MSH path @@ -3265,7 +3265,7 @@ internal static string RemoveProviderQualifier(string path) } return result; - } // RemoveProviderQualifier + } /// /// Generates a collection of containers and/or leaves that are children of the containers @@ -3457,10 +3457,10 @@ private List GenerateNewPSPathsWithGlobLeaf( childPath = isLastLeaf ? childPath : WildcardPattern.Escape(childPath); newDirs.Add(childPath); } - } // foreach (child in childNames) + } } - } // foreach (dir in currentDirs) - } // if (StringContainsGlobCharacters(leafElement)) + } + } else { s_tracer.WriteLine( @@ -3508,11 +3508,11 @@ private List GenerateNewPSPathsWithGlobLeaf( newDirs.Add(childPath); } } - } // foreach (dir in currentDirs) - } // if (StringContainsGlobCharacters(leafElement)) + } + } return newDirs; - } // GenerateNewPSPathsWithGlobLeaf + } /// /// Generates an array of provider specific paths from the single provider specific @@ -3840,7 +3840,7 @@ internal Collection ExpandGlobPath( } } } - } // while (leafElements.Count > 0) + } Dbg.Diagnostics.Assert( dirs != null, @@ -3892,7 +3892,7 @@ internal Collection ExpandGlobPath( } return result; - } // ExpandGlobPath + } /// /// Generates a collection of containers and/or leaves that are children of the containers @@ -4048,10 +4048,10 @@ internal List GenerateNewPathsWithGlobLeaf( newDirs.Add(childPath); } - } // foreach (child in childNames) + } } - } // foreach (dir in currentDirs) - } // if (StringContainsGlobCharacters(leafElement)) + } + } else { s_tracer.WriteLine( @@ -4095,11 +4095,11 @@ internal List GenerateNewPathsWithGlobLeaf( s_pathResolutionTracer.WriteLine("Valid intermediate container: {0}", childPath); } } - } // foreach (dir in currentDirs) - } // if (StringContainsGlobCharacters(leafElement)) + } + } return newDirs; - } // GenerateNewPathsWithGlobLeaf + } /// /// Gets the child names in the specified path by using the provider @@ -4311,7 +4311,7 @@ private Collection GetChildNamesInDir( { getChildNamesContext.RemoveStopReferral(); } - } // GetChildNamesInDir + } /// /// Determines if the specified PSObject contains a string that matches the specified @@ -4501,7 +4501,7 @@ private static string ConvertMshEscapeToRegexEscape(string path) result.Append(workerArray[index]); } - } // for () + } s_tracer.WriteLine( "Original path: {0} Converted to: {1}", @@ -4509,7 +4509,7 @@ private static string ConvertMshEscapeToRegexEscape(string path) result.ToString()); return result.ToString(); - } // ConvertMshEscapeToRegexEscape + } /// /// Determines if the path is relative to a provider home based on @@ -4559,7 +4559,7 @@ internal static bool IsHomePath(string path) } return result; - } // IsHomePath + } /// /// Determines if the specified path looks like a remote path. (starts with @@ -4583,7 +4583,7 @@ internal static bool IsProviderDirectPath(string path) return path.StartsWith(StringLiterals.DefaultRemotePathPrefix, StringComparison.Ordinal) || path.StartsWith(StringLiterals.AlternateRemotePathPrefix, StringComparison.Ordinal); - } // IsRemotePath + } /// /// Generates the path for the home location for a provider when given a @@ -4643,7 +4643,7 @@ internal string GetHomeRelativePath(string path) provider = _sessionState.Internal.GetSingleProvider(providerName); path = path.Substring(index + StringLiterals.ProviderPathSeparator.Length); } - } // IsProviderPath + } if (path.IndexOf(StringLiterals.HomePath, StringComparison.Ordinal) == 0) { @@ -4695,10 +4695,10 @@ internal string GetHomeRelativePath(string path) } } result = path; - } // IsHomePath + } return result; - } // GetHomeRelativePath + } private static void TraceFilters(CmdletProviderContext context) { @@ -4732,5 +4732,5 @@ private static void TraceFilters(CmdletProviderContext context) } #endregion internal methods - } // class LocationGlobber -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/namespaces/NavigationProviderBase.cs b/src/System.Management.Automation/namespaces/NavigationProviderBase.cs index 4792027930d..d53c1816446 100644 --- a/src/System.Management.Automation/namespaces/NavigationProviderBase.cs +++ b/src/System.Management.Automation/namespaces/NavigationProviderBase.cs @@ -66,7 +66,7 @@ internal string MakePath( // Call virtual method return MakePath(parent, child); - } // MakePath + } /// /// Internal wrapper for the GetParentPath protected method. It is called instead @@ -104,7 +104,7 @@ internal string GetParentPath( // Call virtual method return GetParentPath(path, root); - } // GetParentPath + } /// /// Internal wrapper for the NormalizeRelativePath method. It is called instead @@ -141,7 +141,7 @@ internal string NormalizeRelativePath( // Call virtual method return NormalizeRelativePath(path, basePath); - } // NormalizeRelativePath + } /// /// Internal wrapper for the GetChildName protected method. It is called instead @@ -172,7 +172,7 @@ internal string GetChildName( // Call virtual method return GetChildName(path); - } // GetChildName + } /// /// Internal wrapper for the IsItemContainer protected method. It is called instead @@ -197,7 +197,7 @@ internal bool IsItemContainer( // Call virtual method return IsItemContainer(path); - } // IsItemContainer + } /// /// Internal wrapper for the MoveItem protected method. It is called instead @@ -226,7 +226,7 @@ internal void MoveItem( // Call virtual method MoveItem(path, destination); - } // MoveItem + } /// /// Gives the provider to attach additional parameters to @@ -253,7 +253,7 @@ internal object MoveItemDynamicParameters( { Context = context; return MoveItemDynamicParameters(path, destination); - } // MoveItemDynamicParameters + } #endregion Internal methods @@ -290,7 +290,7 @@ internal object MoveItemDynamicParameters( protected virtual string MakePath(string parent, string child) { return MakePath(parent, child, childIsLeaf: false); - } // MakePath + } /// /// Joins two strings with a path a provider specific path separator. @@ -503,7 +503,7 @@ protected virtual string GetParentPath(string path, string root) } return parentPath; } - } // GetParentPath + } /// /// Normalizes the path that was passed in and returns the normalized path @@ -538,7 +538,7 @@ protected virtual string NormalizeRelativePath( { return ContractRelativePath(path, basePath, false, Context); } - } // NormalizeRelativePath + } internal string ContractRelativePath( string path, @@ -696,7 +696,7 @@ internal string ContractRelativePath( } return result; - } // ContractRelativePath + } /// /// Get the common base path of two paths @@ -792,7 +792,7 @@ protected virtual string GetChildName(string path) return result; } - } // GetChildName + } /// /// Determines if the item specified by the path is a container. @@ -890,7 +890,7 @@ protected virtual object MoveItemDynamicParameters( { return null; } - } // MoveItemDynamicParameters + } #endregion Protected methods @@ -1005,7 +1005,7 @@ private Stack TokenizePathToStack(string path, string basePath) } return tokenizedPathStack; - } // TokenizePathToStack + } /// /// Given the tokenized path, the relative path elements are removed. @@ -1077,7 +1077,7 @@ private static Stack NormalizeThePath( } return normalizedPathStack; - } // NormalizeThePath + } /// /// Pops each leaf element of the stack and uses MakePath to generate the relative path @@ -1110,11 +1110,11 @@ private string CreateNormalizedRelativePathFromStack(Stack normalizedPat } } return leafElement; - } // CreateNormalizedRelativePathFromStack + } #endregion private members - } // NavigationCmdletProvider + } #endregion NavigationCmdletProvider -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/namespaces/PathInfo.cs b/src/System.Management.Automation/namespaces/PathInfo.cs index da1d814403b..6d23cbbeaaa 100644 --- a/src/System.Management.Automation/namespaces/PathInfo.cs +++ b/src/System.Management.Automation/namespaces/PathInfo.cs @@ -27,7 +27,7 @@ public PSDriveInfo Drive return result; } - } // Drive + } /// /// Gets the provider that contains the path. @@ -38,7 +38,7 @@ public ProviderInfo Provider { return _provider; } - } // Provider + } /// /// This is the internal mechanism to get the hidden drive. @@ -49,7 +49,7 @@ public ProviderInfo Provider internal PSDriveInfo GetDrive() { return _drive; - } // GetDrive + } /// /// Gets the provider internal path for the PSPath that this PathInfo represents. @@ -88,7 +88,7 @@ public string Path { return this.ToString(); } - } // Path + } private PSDriveInfo _drive; private ProviderInfo _provider; @@ -119,7 +119,7 @@ public override string ToString() } return result; - } // ToString + } /// /// The constructor of the PathInfo object. @@ -161,6 +161,6 @@ internal PathInfo(PSDriveInfo drive, ProviderInfo provider, string path, Session _provider = provider; _path = path; _sessionState = sessionState; - } // constructor - } // PathInfo -} // namespace System.Management.Automation + } + } +} diff --git a/src/System.Management.Automation/namespaces/ProviderBase.cs b/src/System.Management.Automation/namespaces/ProviderBase.cs index 47b70aa0c08..cc6941671e6 100644 --- a/src/System.Management.Automation/namespaces/ProviderBase.cs +++ b/src/System.Management.Automation/namespaces/ProviderBase.cs @@ -101,7 +101,7 @@ internal void SetProviderInformation(ProviderInfo providerInfoToSet) } _providerInformation = providerInfoToSet; - } // SetProviderInformation + } /// /// Checks whether the filter of the provider is set. @@ -179,7 +179,7 @@ internal CmdletProviderContext Context _contextBase = value; _contextBase.ProviderInstance = this; } - } // Context + } /// /// Called when the provider is first initialized. It sets the context @@ -195,7 +195,7 @@ internal ProviderInfo Start(ProviderInfo providerInfo, CmdletProviderContext cmd { Context = cmdletProviderContext; return Start(providerInfo); - } // Start + } /// /// Gets an object that defines the additional parameters for the Start implementation @@ -213,7 +213,7 @@ internal object StartDynamicParameters(CmdletProviderContext cmdletProviderConte Context = cmdletProviderContext; return StartDynamicParameters(); - } // StartDynamicParameter + } /// /// Called when the provider is being removed. It sets the context @@ -226,12 +226,12 @@ internal void Stop(CmdletProviderContext cmdletProviderContext) { Context = cmdletProviderContext; Stop(); - } // Stop + } /// protected internal virtual void StopProcessing() { - } // StopProcessing + } #endregion CmdletProvider method wrappers @@ -270,7 +270,7 @@ internal void GetProperty( // Call interface method propertyProvider.GetProperty(path, providerSpecificPickList); - } // GetProperty + } /// /// Gives the provider a chance to attach additional parameters to @@ -305,7 +305,7 @@ internal object GetPropertyDynamicParameters( return null; } return propertyProvider.GetPropertyDynamicParameters(path, providerSpecificPickList); - } // GetPropertyDynamicParameters + } /// /// Internal wrapper for the SetProperty protected method. This method will @@ -340,7 +340,7 @@ internal void SetProperty( // Call interface method propertyProvider.SetProperty(path, propertyValue); - } // SetProperty + } /// /// Gives the provider a chance to attach additional parameters to @@ -375,7 +375,7 @@ internal object SetPropertyDynamicParameters( return null; } return propertyProvider.SetPropertyDynamicParameters(path, propertyValue); - } // SetPropertyDynamicParameters + } /// /// Internal wrapper for the ClearProperty protected method. This method will @@ -413,7 +413,7 @@ internal void ClearProperty( // Call interface method propertyProvider.ClearProperty(path, propertyName); - } // ClearProperty + } /// /// Gives the provider a chance to attach additional parameters to @@ -448,7 +448,7 @@ internal object ClearPropertyDynamicParameters( return null; } return propertyProvider.ClearPropertyDynamicParameters(path, providerSpecificPickList); - } // ClearPropertyDynamicParameters + } #endregion IPropertyCmdletProvider @@ -498,7 +498,7 @@ internal void NewProperty( // Call interface method propertyProvider.NewProperty(path, propertyName, propertyTypeName, value); - } // NewProperty + } /// /// Gives the provider a chance to attach additional parameters to @@ -540,7 +540,7 @@ internal object NewPropertyDynamicParameters( return null; } return propertyProvider.NewPropertyDynamicParameters(path, propertyName, propertyTypeName, value); - } // NewPropertyDynamicParameters + } /// /// Internal wrapper for the RemoveProperty protected method. This method will @@ -578,7 +578,7 @@ internal void RemoveProperty( // Call interface method propertyProvider.RemoveProperty(path, propertyName); - } // RemoveProperty + } /// /// Gives the provider a chance to attach additional parameters to @@ -612,7 +612,7 @@ internal object RemovePropertyDynamicParameters( return null; } return propertyProvider.RemovePropertyDynamicParameters(path, propertyName); - } // RemovePropertyDynamicParameters + } /// /// Internal wrapper for the RenameProperty protected method. This method will @@ -654,7 +654,7 @@ internal void RenameProperty( // Call interface method propertyProvider.RenameProperty(path, propertyName, newPropertyName); - } // RenameProperty + } /// /// Gives the provider a chance to attach additional parameters to @@ -692,7 +692,7 @@ internal object RenamePropertyDynamicParameters( return null; } return propertyProvider.RenamePropertyDynamicParameters(path, sourceProperty, destinationProperty); - } // RenamePropertyDynamicParameters + } /// /// Internal wrapper for the CopyProperty protected method. This method will @@ -738,7 +738,7 @@ internal void CopyProperty( // Call interface method propertyProvider.CopyProperty(sourcePath, sourceProperty, destinationPath, destinationProperty); - } // CopyProperty + } /// /// Gives the provider a chance to attach additional parameters to @@ -780,7 +780,7 @@ internal object CopyPropertyDynamicParameters( return null; } return propertyProvider.CopyPropertyDynamicParameters(path, sourceProperty, destinationPath, destinationProperty); - } // CopyPropertyDynamicParameters + } /// /// Internal wrapper for the MoveProperty protected method. This method will @@ -826,7 +826,7 @@ internal void MoveProperty( // Call interface method propertyProvider.MoveProperty(sourcePath, sourceProperty, destinationPath, destinationProperty); - } // MoveProperty + } /// /// Gives the provider a chance to attach additional parameters to @@ -868,7 +868,7 @@ internal object MovePropertyDynamicParameters( return null; } return propertyProvider.MovePropertyDynamicParameters(path, sourceProperty, destinationPath, destinationProperty); - } // MovePropertyDynamicParameters + } #endregion IDynamicPropertyCmdletProvider method wrappers @@ -905,7 +905,7 @@ internal IContentReader GetContentReader( // Call interface method return contentProvider.GetContentReader(path); - } // GetContentReader + } /// /// Gives the provider a chance to attach additional parameters to @@ -935,7 +935,7 @@ internal object GetContentReaderDynamicParameters( return null; } return contentProvider.GetContentReaderDynamicParameters(path); - } // GetContentReaderDynamicParameters + } /// /// Internal wrapper for the GetContentWriter protected method. This method will @@ -968,7 +968,7 @@ internal IContentWriter GetContentWriter( // Call interface method return contentProvider.GetContentWriter(path); - } // GetContentWriter + } /// /// Gives the provider a chance to attach additional parameters to @@ -998,7 +998,7 @@ internal object GetContentWriterDynamicParameters( return null; } return contentProvider.GetContentWriterDynamicParameters(path); - } // GetContentWriterDynamicParameters + } /// /// Internal wrapper for the ClearContent protected method. This method will @@ -1028,7 +1028,7 @@ internal void ClearContent( // Call interface method contentProvider.ClearContent(path); - } // ClearContent + } /// /// Gives the provider a chance to attach additional parameters to @@ -1058,7 +1058,7 @@ internal object ClearContentDynamicParameters( return null; } return contentProvider.ClearContentDynamicParameters(path); - } // ClearContentDynamicParameters + } #endregion IContentCmdletProvider method wrappers @@ -1140,9 +1140,9 @@ public bool Stopping "The context should always be set"); return Context.Stopping; - } // TraceProperty - } // get - } // Stopping + } + } + } /// /// Gets the instance of session state for the current runspace. @@ -1158,9 +1158,9 @@ public SessionState SessionState "The context should always be set"); return new SessionState(Context.ExecutionContext.EngineSessionState); - } // TraceProperty - } // get - } // SessionState + } + } + } /// /// Gets the instance of the provider interface APIs for the current runspace. @@ -1176,9 +1176,9 @@ public ProviderIntrinsics InvokeProvider "The context should always be set"); return new ProviderIntrinsics(Context.ExecutionContext.EngineSessionState); - } // TraceProperty - } // get - } // InvokeProvider + } + } + } /// /// Gets the instance of the command invocation APIs for the current runspace. @@ -1194,9 +1194,9 @@ public CommandInvocationIntrinsics InvokeCommand "The context should always be set"); return new CommandInvocationIntrinsics(Context.ExecutionContext); - } // TraceProperty - } // get - } // InvokeCommand + } + } + } /// /// Gets the credentials under which the operation should run. @@ -1231,8 +1231,8 @@ protected internal ProviderInfo ProviderInfo using (PSTransactionManager.GetEngineProtectionScope()) { return _providerInformation; - } // TraceProperty - } // get + } + } } /// @@ -1249,9 +1249,9 @@ protected PSDriveInfo PSDriveInfo "The context should always be set"); return Context.Drive; - } // TraceProperty - } // get - } // PSDriveInfo + } + } + } /// /// The dynamic parameters object populated with the values as specified @@ -1268,9 +1268,9 @@ protected object DynamicParameters "The context should always be set"); return Context.DynamicParameters; - } // TraceProperty - } // get - } // DynamicParameters + } + } + } /// /// Gets the force property. @@ -1295,9 +1295,9 @@ public SwitchParameter Force "The context should always be set"); return Context.Force; - } // TraceProperty - } // get - } // Force + } + } + } /// /// Gets the provider specific filter that was supplied by the caller. @@ -1313,9 +1313,9 @@ public string Filter "The context should always be set"); return Context.Filter; - } // TraceProperty - } // get - } // Filter + } + } + } /// /// Gets the include wildcard patterns which is used to determine which items @@ -1332,9 +1332,9 @@ public Collection Include "The context should always be set"); return Context.Include; - } // TraceProperty - } // get - } // Include + } + } + } /// /// Gets the exclude wildcard patterns which is used to determine which items @@ -1351,9 +1351,9 @@ public Collection Exclude "The context should always be set"); return Context.Exclude; - } // TraceProperty - } // get - } // Exclude + } + } + } /// /// Gets the host interaction APIs. @@ -1371,7 +1371,7 @@ public PSHost Host return Context.ExecutionContext.EngineHostInterface; } } - } // Host + } #region IResourceSupplier /// @@ -1429,7 +1429,7 @@ public virtual string GetResourceString(string baseName, string resourceId) return retValue; } - } // GetResourceString + } #endregion IResourceSupplier #region ThrowTerminatingError @@ -1490,7 +1490,7 @@ public bool ShouldProcess( return Context.ShouldProcess(target); } - } // ShouldProcess + } /// public bool ShouldProcess( @@ -1505,7 +1505,7 @@ public bool ShouldProcess( return Context.ShouldProcess(target, action); } - } // ShouldProcess + } /// public bool ShouldProcess( @@ -1524,7 +1524,7 @@ public bool ShouldProcess( verboseWarning, caption); } - } // ShouldProcess + } /// public bool ShouldProcess( @@ -1545,7 +1545,7 @@ public bool ShouldProcess( caption, out shouldProcessReason); } - } // ShouldProcess + } /// public bool ShouldContinue( @@ -1560,7 +1560,7 @@ public bool ShouldContinue( return Context.ShouldContinue(query, caption); } - } // ShouldContinue + } /// public bool ShouldContinue( @@ -1578,7 +1578,7 @@ public bool ShouldContinue( return Context.ShouldContinue( query, caption, ref yesToAll, ref noToAll); } - } // ShouldContinue + } #region Transaction Support @@ -1623,7 +1623,7 @@ public void WriteVerbose(string text) Context.WriteVerbose(text); } - } // WriteVerbose + } /// public void WriteWarning(string text) @@ -1636,7 +1636,7 @@ public void WriteWarning(string text) Context.WriteWarning(text); } - } // WriteVerbose + } /// public void WriteProgress(ProgressRecord progressRecord) @@ -1654,7 +1654,7 @@ public void WriteProgress(ProgressRecord progressRecord) Context.WriteProgress(progressRecord); } - } // WriteProgress + } /// public void WriteDebug(string text) @@ -1667,7 +1667,7 @@ public void WriteDebug(string text) Context.WriteDebug(text); } - } // WriteDebug + } /// public void WriteInformation(InformationRecord record) @@ -1680,7 +1680,7 @@ public void WriteInformation(InformationRecord record) Context.WriteInformation(record); } - } // WriteInformation + } /// public void WriteInformation(Object messageData, string[] tags) @@ -1693,7 +1693,7 @@ public void WriteInformation(Object messageData, string[] tags) Context.WriteInformation(messageData, tags); } - } // WriteInformation + } /// /// Converts the incoming object to a PSObject and then adds extra @@ -1725,7 +1725,7 @@ private void WriteObject( "The context should always be set"); Context.WriteObject(result); - } // WriteObject + } /// /// Converts the incoming object to a PSObject and then adds extra @@ -1748,7 +1748,7 @@ private void WriteObject( "The context should always be set"); Context.WriteObject(result); - } // WriteObject + } /// /// Wraps the item in a PSObject and attaches some notes to the @@ -1848,7 +1848,7 @@ private PSObject WrapOutputInPSObject( providerBaseTracer.WriteLine("Attaching {0} = {1}", "PSProvider", this.ProviderInfo); return result; - } // WrapOutputInPSObject + } /// /// Writes an item to the output as a PSObject with extra data attached @@ -1880,7 +1880,7 @@ public void WriteItemObject( { WriteObject(item, path, isContainer); } - } // WriteItemObject + } /// /// Writes a property object to the output as a PSObject with extra data attached @@ -1908,7 +1908,7 @@ public void WritePropertyObject( { WriteObject(propertyValue, path); } - } // WritePropertyObject + } /// /// Writes a Security Descriptor object to the output as a PSObject with extra data attached @@ -1936,7 +1936,7 @@ public void WriteSecurityDescriptorObject( { WriteObject(securityDescriptor, path); } - } // WriteSecurityDescriptorObject + } /// public void WriteError(ErrorRecord errorRecord) @@ -1964,15 +1964,15 @@ public void WriteError(ErrorRecord errorRecord) Context.WriteError(errorRecord); } - } // WriteError + } #endregion User feedback mechanisms #endregion protected members - } // CmdletProvider + } #endregion CmdletProvider -} // namespace System.Management.Automation +} #pragma warning restore 56506 diff --git a/src/System.Management.Automation/namespaces/ProviderBaseSecurity.cs b/src/System.Management.Automation/namespaces/ProviderBaseSecurity.cs index 65359bc4224..16fd633c9e1 100644 --- a/src/System.Management.Automation/namespaces/ProviderBaseSecurity.cs +++ b/src/System.Management.Automation/namespaces/ProviderBaseSecurity.cs @@ -47,7 +47,7 @@ internal void GetSecurityDescriptor( // Call interface method permissionProvider.GetSecurityDescriptor(path, sections); - } // GetSecurityDescriptor + } /// /// Internal wrapper for the SetSecurityDescriptor protected method. This method will @@ -83,7 +83,7 @@ internal void SetSecurityDescriptor( // Call interface method permissionProvider.SetSecurityDescriptor(path, securityDescriptor); - } // SetSecurityDescriptor + } private static void CheckIfSecurityDescriptorInterfaceIsSupported(ISecurityDescriptorCmdletProvider permissionProvider) { diff --git a/src/System.Management.Automation/namespaces/ProviderDeclarationAttribute.cs b/src/System.Management.Automation/namespaces/ProviderDeclarationAttribute.cs index 08f1ffd4fcd..ce5fe98d8d4 100644 --- a/src/System.Management.Automation/namespaces/ProviderDeclarationAttribute.cs +++ b/src/System.Management.Automation/namespaces/ProviderDeclarationAttribute.cs @@ -50,7 +50,7 @@ public CmdletProviderAttribute( ProviderName = providerName; ProviderCapabilities = providerCapabilities; - } // constructor + } private char[] _illegalCharacters = new char[] { ':', '\\', '[', ']', '?', '*' }; @@ -67,7 +67,7 @@ public CmdletProviderAttribute( #region private data #endregion private data - } // class CmdletProviderAttribute + } /// /// This enumeration defines the capabilities that the provider implements. @@ -150,5 +150,5 @@ public enum ProviderCapabilities /// transaction to it, an exception is thrown. /// Transactions = 0x40, - } // ProviderCapabilities -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/namespaces/RegistryProvider.cs b/src/System.Management.Automation/namespaces/RegistryProvider.cs index 157144004d0..cdb891d3e19 100644 --- a/src/System.Management.Automation/namespaces/RegistryProvider.cs +++ b/src/System.Management.Automation/namespaces/RegistryProvider.cs @@ -116,7 +116,7 @@ protected override PSDriveInfo NewDrive(PSDriveInfo drive) drive.Root)); } return drive; - } // NewDrive + } /// /// Creates HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER registry drives during provider initialization. @@ -149,7 +149,7 @@ protected override Collection InitializeDefaultDrives() null)); return drives; - } // InitializeDefaultDrives + } #endregion DriveCmdletProvider overrides @@ -223,7 +223,7 @@ protected override void GetItem(string path) // Write out the result WriteRegistryItemObject(result, path); - } // GetItem + } /// /// Sets registry values at to the specified. @@ -318,7 +318,7 @@ protected override void SetItem(string path, object value) return; } } - } // DynamicParameters != null + } if (!valueSet) { @@ -366,8 +366,8 @@ protected override void SetItem(string path, object value) key.Close(); WriteItemObject(result, path, false); - } // ShouldProcess - } // SetItem + } + } /// /// Gets the dynamic parameters for the SetItem method. @@ -385,7 +385,7 @@ protected override void SetItem(string path, object value) protected override object SetItemDynamicParameters(string path, object value) { return new RegistryProviderSetItemDynamicParameter(); - } // SetItemDynamicParameters + } /// /// Clears the item at the specified . @@ -493,8 +493,8 @@ protected override void ClearItem(string path) // Write out the key WriteRegistryItemObject(key, path); - } // ShouldProcess - } // ClearItem + } + } #endregion ItemCmdletProvider overrides @@ -625,8 +625,8 @@ protected override void GetChildItems( WriteError(new ErrorRecord(unauthorizedAccessException, unauthorizedAccessException.GetType().FullName, ErrorCategory.PermissionDenied, keypath)); } } - } // foreach subkeyName in keyNames - } // keyNames != null + } + } } catch (System.IO.IOException ioException) { @@ -650,7 +650,7 @@ protected override void GetChildItems( WriteError(new ErrorRecord(unauthorizedAccessException, unauthorizedAccessException.GetType().FullName, ErrorCategory.PermissionDenied, path)); } } - } // GetChildItems + } /// /// Gets all the child key and value names of the key at the specified . @@ -744,7 +744,7 @@ protected override void GetChildNames( WriteError(new ErrorRecord(unauthorizedAccessException, unauthorizedAccessException.GetType().FullName, ErrorCategory.PermissionDenied, path)); } } - } // GetChildNames + } private const string charactersThatNeedEscaping = ".*?[]:"; @@ -795,7 +795,7 @@ private static string EscapeSpecialChars(string path) } return result.ToString(); - } // EscapeSpecialChars + } /// /// Escapes the characters in the registry key name that are used by globbing and @@ -844,7 +844,7 @@ private static string EscapeChildName(string name) } return result.ToString(); - } // EscapeChildName + } /// /// Renames the key at the specified to . @@ -907,8 +907,8 @@ protected override void RenameItem( // Implement rename as a move operation MoveRegistryItem(path, newPath); - } // ShouldProcess - } // RenameItem + } + } /// /// Creates a new registry key or value at the specified . @@ -1070,8 +1070,8 @@ protected override void NewItem( { WriteError(new ErrorRecord(notSupportedException, notSupportedException.GetType().FullName, ErrorCategory.InvalidOperation, path)); } - } // ShouldProcess - } // NewItem + } + } /// /// Removes the specified registry key and all sub-keys @@ -1155,10 +1155,10 @@ protected override void RemoveItem( { WriteError(new ErrorRecord(notSupportedException, notSupportedException.GetType().FullName, ErrorCategory.InvalidOperation, path)); } - } // ShouldProcess + } key.Close(); - } // RemoveItem + } /// /// Determines if the key at the specified path exists. @@ -1212,7 +1212,7 @@ protected override bool ItemExists(string path) } return result; - } // ItemExists + } /// /// Determines if the specified key has subkeys. @@ -1265,7 +1265,7 @@ protected override bool HasChildItems(string path) } return result; - } // HasChildItems + } /// /// Copies the specified registry key to the specified . @@ -1332,7 +1332,7 @@ protected override void CopyItem( } key.Close(); - } // CopyItem + } private bool CopyRegistryKey( IRegistryWrapper key, @@ -1493,7 +1493,7 @@ private bool CopyRegistryKey( } return result; - } // CopyRegistryKey + } private bool ErrorIfDestinationIsSourceOrChildOfSource( string sourcePath, @@ -1553,7 +1553,7 @@ private bool ErrorIfDestinationIsSourceOrChildOfSource( destinationPath)); } return result; - } // ErrorIfDestinationIsSourceOrChildOfSource + } #endregion ContainerCmdletProvider overrides @@ -1613,7 +1613,7 @@ protected override bool IsItemContainer(string path) } return result; - } // IsItemContainer + } /// /// Moves the specified key. @@ -1657,7 +1657,7 @@ protected override void MoveItem( { MoveRegistryItem(path, destination); } - } // MoveItem + } private void MoveRegistryItem(string path, string destination) { @@ -1747,7 +1747,7 @@ private void MoveRegistryItem(string path, string destination) return; } } - } // MoveRegistryItem + } #endregion NavigationCmdletProvider overrides @@ -1817,7 +1817,7 @@ public void GetProperty( { WritePropertyObject(propertyResults, path); } - } // GetProperty + } /// /// Sets the specified properties of the item at the specified . @@ -1924,7 +1924,7 @@ public void SetProperty( } key.Close(); - } // SetProperty + } /// /// Gives the provider a chance to attach additional parameters to the @@ -2290,8 +2290,8 @@ public void RemoveProperty( WriteError(new ErrorRecord(unauthorizedAccessException, unauthorizedAccessException.GetType().FullName, ErrorCategory.PermissionDenied, propertyNameToRemove)); } - } // if should process - } // foreach + } + } key.Close(); WriteErrorIfPerfectMatchNotFound(hadAMatch, path, propertyName); @@ -2841,7 +2841,7 @@ private void CopyProperty( { WriteWrappedPropertyObject(sourceValue, realSourceProperty, sourceKey.Name); } - } // CopyProperty + } private void MoveProperty( IRegistryWrapper sourceKey, @@ -2907,7 +2907,7 @@ private void MoveProperty( WriteError(new ErrorRecord(unauthorizedAccessException, unauthorizedAccessException.GetType().FullName, ErrorCategory.PermissionDenied, sourceKey.Name)); return; } - } // MoveProperty + } /// /// Converts all / in the path to \ @@ -2934,7 +2934,7 @@ private string NormalizePath(string path) } return result; - } // NormalizePath + } private bool HasRelativePathTokens(string path) { @@ -3056,10 +3056,10 @@ private void GetFilteredRegistryKeyProperties(string path, hadAMatch = true; filteredCollection.Add(valueName); } - } // foreach + } WriteErrorIfPerfectMatchNotFound(hadAMatch, path, requestedValueName); - } // foreach + } } private void WriteErrorIfPerfectMatchNotFound(bool hadAMatch, string path, string requestedValueName) @@ -3270,7 +3270,7 @@ private IRegistryWrapper GetHiveRoot(string path) } } return null; - } // GetHiveRoot + } /// /// Creates the parent for the keypath specified by . @@ -3579,7 +3579,7 @@ private IRegistryWrapper GetRegkeyForPath(string path, bool writeAccess) } while (false); return result; - } // GetRegkeyForPath + } // NB: The HKEY_DYN_DATA hive is left out of the following lists because // it is only available on Win98/ME and we do not support that platform. @@ -3734,7 +3734,7 @@ private void SetRegistryValue( WriteWrappedPropertyObject(newValue, propertyName, path); } - } // SetRegistryValue + } /// /// helper to wrap property values when sent to the pipeline into an PSObject; @@ -3997,7 +3997,7 @@ private void WriteRegistryItemObject( outputObject.AddOrSetProperty("Property", valueNames); WriteItemObject(outputObject, path, true); - } // WriteRegistryItemObject + } /// /// Takes a string and tries to parse it into a RegistryValueKind enum @@ -4058,7 +4058,7 @@ private bool ParseKind(string type, out RegistryValueKind kind) } return success; - } // ParseKind + } /// /// Gets the default value name token from the resource. @@ -4106,7 +4106,7 @@ private string GetPropertyName(string userEnteredPropertyName) return result; } #endregion Private members - } // RegistryProvider + } /// /// Defines dynamic parameters for the registry provider @@ -4124,5 +4124,5 @@ public class RegistryProviderSetItemDynamicParameter [Parameter(ValueFromPipelineByPropertyName = true)] public RegistryValueKind Type { get; set; } = RegistryValueKind.Unknown; } -} // namespace System.Management.Automation +} #endif // !UNIX diff --git a/src/System.Management.Automation/namespaces/RegistrySecurity.cs b/src/System.Management.Automation/namespaces/RegistrySecurity.cs index 6c25b9dc467..1ebd307c71c 100644 --- a/src/System.Management.Automation/namespaces/RegistrySecurity.cs +++ b/src/System.Management.Automation/namespaces/RegistrySecurity.cs @@ -150,7 +150,7 @@ public void SetSecurityDescriptor( WriteSecurityDescriptorObject(sd, path); } - } // SetSecurityDescriptor + } /// /// Creates a new empty security descriptor. diff --git a/src/System.Management.Automation/namespaces/SessionStateProviderBase.cs b/src/System.Management.Automation/namespaces/SessionStateProviderBase.cs index a52c34fa1e1..c0dd2d06c24 100644 --- a/src/System.Management.Automation/namespaces/SessionStateProviderBase.cs +++ b/src/System.Management.Automation/namespaces/SessionStateProviderBase.cs @@ -110,7 +110,7 @@ internal virtual object GetValueOfItem(object item) value = ((DictionaryEntry)item).Value; } return value; - } // GetValueOfItem + } /// /// Determines if the item can be renamed. Derived classes that need @@ -167,7 +167,7 @@ protected override void GetItem(string name) WriteItemObject(item, name, isContainer); } } - } // GetItem + } /// /// Sets a session state item to a given value @@ -230,7 +230,7 @@ protected override void SetItem( argException.ErrorRecord, argException)); } - } // SetItem + } /// /// @@ -280,7 +280,7 @@ protected override void ClearItem(string path) argException.ErrorRecord, argException)); } - } // ClearItem + } #endregion ItemCmdletProvider overrides @@ -399,7 +399,7 @@ protected override void GetChildItems(string path, bool recurse) } } } - } // GetChildItems + } /// /// Gets the name(s) of the item(s) at the given path @@ -491,7 +491,7 @@ protected override void GetChildNames(string path, ReturnContainers returnContai } } } - } // GetChildNames + } /// /// Determines if there are any items @@ -527,7 +527,7 @@ protected override bool HasChildItems(string path) } return result; - } // HasChildItems + } /// /// Determines if the specified item exists @@ -572,7 +572,7 @@ protected override bool ItemExists(string path) } return result; - } // ItemExists + } /// /// Determines if the specified path is syntactically and semantically valid. @@ -739,7 +739,7 @@ protected override void NewItem(string path, string type, object newItem) SetItem(path, newItem); } } - } // NewItem + } /// /// Copies the specified item. @@ -848,7 +848,7 @@ protected override void CopyItem(string path, string copyPath, bool recurse) e)); return; } - } // CopyItem + } /// /// Copies the specified item. @@ -994,7 +994,7 @@ protected override void RenameItem(string name, string newName) e)); return; } - } // RenameItem + } #endregion ContainerCmdletProvider overrides @@ -1074,7 +1074,7 @@ public void ClearContent(string path) #endregion #endregion - } // SessionStateProviderBase + } /// /// The content reader/writer for all providers deriving from SessionStateProviderBase diff --git a/src/System.Management.Automation/namespaces/StackInfo.cs b/src/System.Management.Automation/namespaces/StackInfo.cs index 9cea8677345..601fc2061ce 100644 --- a/src/System.Management.Automation/namespaces/StackInfo.cs +++ b/src/System.Management.Automation/namespaces/StackInfo.cs @@ -51,11 +51,11 @@ internal PathInfoStack(string stackName, Stack locationStack) : base() { this.Push(stackContents[index]); } - } // constructor + } /// /// Gets the name of the stack /// public string Name { get; } = null; - } // PathInfoStack -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/namespaces/VariableProvider.cs b/src/System.Management.Automation/namespaces/VariableProvider.cs index b4558589b9f..86ddd5cbbba 100644 --- a/src/System.Management.Automation/namespaces/VariableProvider.cs +++ b/src/System.Management.Automation/namespaces/VariableProvider.cs @@ -36,7 +36,7 @@ public sealed class VariableProvider : SessionStateProviderBase /// public VariableProvider() { - } // constructor + } #endregion Constructor @@ -63,7 +63,7 @@ protected override Collection InitializeDefaultDrives() Collection drives = new Collection(); drives.Add(variableDrive); return drives; - } // InitializeDefaultDrives + } #endregion DriveCmdletProvider overrides @@ -85,7 +85,7 @@ internal override object GetSessionStateItem(string name) "The caller should verify this parameter"); return (PSVariable)SessionState.Internal.GetVariable(name, Context.Origin); - } // GetSessionStateItem + } /// /// Sets the variable of the specified name to the specified value @@ -137,7 +137,7 @@ internal override void SetSessionStateItem(string name, object value, bool write { WriteItemObject(item, item.Name, false); } - } // SetSessionStateItem + } /// /// Removes the specified variable from session state. @@ -152,7 +152,7 @@ internal override void RemoveSessionStateItem(string name) "The caller should verify this parameter"); SessionState.Internal.RemoveVariable(name, Force); - } // RemoveSessionStateItem + } /// /// Gets a flattened view of the variables in session state @@ -164,7 +164,7 @@ internal override void RemoveSessionStateItem(string name) internal override IDictionary GetSessionStateTable() { return (IDictionary)SessionState.Internal.GetVariableTable(); - } // GetSessionStateTable + } /// /// Gets the value of the item that is returned from GetItem by @@ -193,7 +193,7 @@ internal override object GetValueOfItem(object item) value = var.Value; } return value; - } // GetValueOfItem + } /// /// Determines if the item can be renamed. Derived classes that need @@ -232,6 +232,6 @@ internal override bool CanRenameItem(object item) } #endregion protected members - } // VariableProvider + } } diff --git a/src/System.Management.Automation/security/wldpNativeMethods.cs b/src/System.Management.Automation/security/wldpNativeMethods.cs index 34989c73c0f..691cf5e98c6 100644 --- a/src/System.Management.Automation/security/wldpNativeMethods.cs +++ b/src/System.Management.Automation/security/wldpNativeMethods.cs @@ -249,7 +249,7 @@ private static SystemEnforcementMode GetAppLockerPolicy(string path, SafeHandle // https://msdn.microsoft.com/library/dd378457.aspx Guid AppDatalocalLowFolderId = new Guid("A520A1A4-1780-4FF6-BD18-167343C5AF16"); tempPath = GetKnownFolderPath(AppDatalocalLowFolderId) + @"\Temp"; - } // end while loop + } // Test policy. result = TestSaferPolicy(testPathScript, testPathModule); diff --git a/src/System.Management.Automation/utils/CommandDiscoveryExceptions.cs b/src/System.Management.Automation/utils/CommandDiscoveryExceptions.cs index cf5384074cd..d5b93ee352d 100644 --- a/src/System.Management.Automation/utils/CommandDiscoveryExceptions.cs +++ b/src/System.Management.Automation/utils/CommandDiscoveryExceptions.cs @@ -523,5 +523,5 @@ private static string BuildMessage(string commandName) #endregion Private } -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/utils/CommandProcessorExceptions.cs b/src/System.Management.Automation/utils/CommandProcessorExceptions.cs index f0bda376570..3d24b4b181d 100644 --- a/src/System.Management.Automation/utils/CommandProcessorExceptions.cs +++ b/src/System.Management.Automation/utils/CommandProcessorExceptions.cs @@ -96,5 +96,5 @@ public ApplicationFailedException(string message, base.SetErrorCategory(ErrorCategory.ResourceUnavailable); } #endregion ctor - } // ApplicationFailedException -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/utils/CryptoUtils.cs b/src/System.Management.Automation/utils/CryptoUtils.cs index d79bb3ee8b2..42796510c56 100644 --- a/src/System.Management.Automation/utils/CryptoUtils.cs +++ b/src/System.Management.Automation/utils/CryptoUtils.cs @@ -1012,8 +1012,8 @@ protected String EncryptSecureStringCore(SecureString secureString) data[j] = 0; } } - } // if (ptr ... - } // if (rsa != null... + } + } else { Dbg.Assert(false, "Session key not available to encrypt secure string"); diff --git a/src/System.Management.Automation/utils/ExecutionExceptions.cs b/src/System.Management.Automation/utils/ExecutionExceptions.cs index 3f269222bd2..8fa123234e1 100644 --- a/src/System.Management.Automation/utils/ExecutionExceptions.cs +++ b/src/System.Management.Automation/utils/ExecutionExceptions.cs @@ -175,7 +175,7 @@ public override ErrorRecord ErrorRecord private ErrorRecord _errorRecord = null; #endregion Properties - } // class CmdletInvocationException + } #endregion CmdletInvocationException #region CmdletProviderInvocationException @@ -295,7 +295,7 @@ private static Exception GetInnerException(Exception e) return (e == null) ? null : e.InnerException; } #endregion Internal - } // CmdletProviderInvocationException + } #endregion CmdletProviderInvocationException #region PipelineStoppedException @@ -369,7 +369,7 @@ public PipelineStoppedException(string message, { } #endregion ctor - } // PipelineStoppedException + } #endregion PipelineStoppedException #region PipelineClosedException @@ -430,7 +430,7 @@ protected PipelineClosedException(SerializationInfo info, { } #endregion Serialization - } // PipelineClosedException + } #endregion PipelineClosedException #region ActionPreferenceStopException @@ -609,7 +609,7 @@ public override ErrorRecord ErrorRecord } private readonly ErrorRecord _errorRecord = null; #endregion Properties - } // ActionPreferenceStopException + } #endregion ActionPreferenceStopException #region ParentContainsErrorRecordException @@ -796,7 +796,7 @@ protected RedirectedException(SerializationInfo info, { } #endregion constructors - } // class RedirectedException + } #endregion RedirectedException #region ScriptCallDepthException @@ -909,7 +909,7 @@ public int CallDepth get { return 0; } } #endregion properties - } // ScriptCallDepthException + } #endregion ScriptCallDepthException #region PipelineDepthException @@ -1018,7 +1018,7 @@ public int CallDepth get { return 0; } } #endregion properties - } // PipelineDepthException + } #endregion #region HaltCommandException @@ -1086,8 +1086,8 @@ protected HaltCommandException(SerializationInfo info, { } #endregion Serialization - } // HaltCommandException + } #endregion HaltCommandException -} // namespace System.Management.Automation +} #pragma warning restore 56506 diff --git a/src/System.Management.Automation/utils/MshArgumentException.cs b/src/System.Management.Automation/utils/MshArgumentException.cs index 6a4ca577973..2c98d6706a8 100644 --- a/src/System.Management.Automation/utils/MshArgumentException.cs +++ b/src/System.Management.Automation/utils/MshArgumentException.cs @@ -150,6 +150,6 @@ public override string Message get { return String.IsNullOrEmpty(_message) ? base.Message : _message; } } private string _message; - } // PSArgumentException -} // System.Management.Automation + } +} diff --git a/src/System.Management.Automation/utils/MshArgumentNullException.cs b/src/System.Management.Automation/utils/MshArgumentNullException.cs index 14092bc2e5b..bece2f66b25 100644 --- a/src/System.Management.Automation/utils/MshArgumentNullException.cs +++ b/src/System.Management.Automation/utils/MshArgumentNullException.cs @@ -148,6 +148,6 @@ public override string Message get { return String.IsNullOrEmpty(_message) ? base.Message : _message; } } private string _message; - } // PSArgumentNullException -} // System.Management.Automation + } +} diff --git a/src/System.Management.Automation/utils/MshArgumentOutOfRangeException.cs b/src/System.Management.Automation/utils/MshArgumentOutOfRangeException.cs index 199d230b9e6..5aee06f7b39 100644 --- a/src/System.Management.Automation/utils/MshArgumentOutOfRangeException.cs +++ b/src/System.Management.Automation/utils/MshArgumentOutOfRangeException.cs @@ -132,6 +132,6 @@ public ErrorRecord ErrorRecord } private ErrorRecord _errorRecord; private string _errorId = "ArgumentOutOfRange"; - } // PSArgumentOutOfRangeException -} // System.Management.Automation + } +} diff --git a/src/System.Management.Automation/utils/MshInvalidOperationException.cs b/src/System.Management.Automation/utils/MshInvalidOperationException.cs index 2ef68b5fbcc..2d9b3dc87f9 100644 --- a/src/System.Management.Automation/utils/MshInvalidOperationException.cs +++ b/src/System.Management.Automation/utils/MshInvalidOperationException.cs @@ -137,6 +137,6 @@ internal void SetErrorId(string errorId) private ErrorCategory _errorCategory = ErrorCategory.InvalidOperation; private object _target = null; - } // PSInvalidOperationException -} // System.Management.Automation + } +} diff --git a/src/System.Management.Automation/utils/MshNotImplementedException.cs b/src/System.Management.Automation/utils/MshNotImplementedException.cs index 9ba08eea797..7ab0bce7720 100644 --- a/src/System.Management.Automation/utils/MshNotImplementedException.cs +++ b/src/System.Management.Automation/utils/MshNotImplementedException.cs @@ -113,6 +113,6 @@ public ErrorRecord ErrorRecord } private ErrorRecord _errorRecord; private string _errorId = "NotImplemented"; - } // PSNotImplementedException -} // System.Management.Automation + } +} diff --git a/src/System.Management.Automation/utils/MshNotSupportedException.cs b/src/System.Management.Automation/utils/MshNotSupportedException.cs index 271e45eaca3..861a648b395 100644 --- a/src/System.Management.Automation/utils/MshNotSupportedException.cs +++ b/src/System.Management.Automation/utils/MshNotSupportedException.cs @@ -113,6 +113,6 @@ public ErrorRecord ErrorRecord } private ErrorRecord _errorRecord; private string _errorId = "NotSupported"; - } // PSNotSupportedException -} // System.Management.Automation + } +} diff --git a/src/System.Management.Automation/utils/MshObjectDisposedException.cs b/src/System.Management.Automation/utils/MshObjectDisposedException.cs index 70f375eba1b..cfbf75a37b2 100644 --- a/src/System.Management.Automation/utils/MshObjectDisposedException.cs +++ b/src/System.Management.Automation/utils/MshObjectDisposedException.cs @@ -119,6 +119,6 @@ public ErrorRecord ErrorRecord } private ErrorRecord _errorRecord; private string _errorId = "ObjectDisposed"; - } // PSObjectDisposedException -} // System.Management.Automation + } +} diff --git a/src/System.Management.Automation/utils/ObjectReader.cs b/src/System.Management.Automation/utils/ObjectReader.cs index 99e5aef43ce..e652d776cba 100644 --- a/src/System.Management.Automation/utils/ObjectReader.cs +++ b/src/System.Management.Automation/utils/ObjectReader.cs @@ -225,7 +225,7 @@ public void Dispose() protected abstract void Dispose(bool disposing); #endregion IDisposable - } // ObjectReaderBase + } /// /// A PipelineReader reading objects from an ObjectStream @@ -335,7 +335,7 @@ protected override void Dispose(bool disposing) _stream.Close(); } } - } // ObjectReader + } /// /// A PipelineReader reading PSObjects from an ObjectStream @@ -472,7 +472,7 @@ private static Collection MakePSObjectCollection( return retval; } #endregion Private - } // PSObjectReader + } /// /// A ObjectReader for a PSDataCollection ObjectStream diff --git a/src/System.Management.Automation/utils/ObjectStream.cs b/src/System.Management.Automation/utils/ObjectStream.cs index a3db8ddaddd..075627db878 100644 --- a/src/System.Management.Automation/utils/ObjectStream.cs +++ b/src/System.Management.Automation/utils/ObjectStream.cs @@ -989,7 +989,7 @@ private void RaiseEvents() WriteReady (this, new EventArgs ()); } #endif - } // RaiseEvents + } #endregion private locking code @@ -1063,7 +1063,7 @@ internal override void Close() RaiseEvents(); } } - } // RaiseEvents + } #endregion internal methods @@ -1164,7 +1164,7 @@ internal override Collection Read(int count) } return results; - } // Read (int count) + } /// /// Blocks until the pipeline closes and reads all objects. @@ -1189,7 +1189,7 @@ internal override Collection ReadToEnd() { // NTRAID#Windows Out Of Band Releases-925566-2005/12/07-JonN return Read(Int32.MaxValue); - } // ReadToEnd + } /// /// Reads objects currently in the stream, but does not block. @@ -1252,7 +1252,7 @@ internal override Collection NonBlockingRead(int maxRequested) } } return results ?? new Collection(); - } // NonBlockingRead + } /// /// Peek the next object @@ -1352,7 +1352,7 @@ internal override int Write(object obj, bool enumerateCollection) continue; } a.Add(o); - } // foreach + } } int objectsWritten = 0; @@ -1436,10 +1436,10 @@ internal override int Write(object obj, bool enumerateCollection) RaiseEvents(); } } - } // end while (count > 0) + } return objectsWritten; - } // Write (object obj, bool enumerateCollection) + } #endregion Write Methods @@ -1517,7 +1517,7 @@ protected override void Dispose(bool disposing) } #endregion IDisposable - } // class ObjectStream + } /// /// An object stream using a PSDataCollection as the object store. @@ -1843,7 +1843,7 @@ internal override int Write(object obj, bool enumerateCollection) } objectsToAdd.Add((T)LanguagePrimitives.ConvertTo(obj, typeof(T), Globalization.CultureInfo.InvariantCulture)); - } // foreach + } } _objects.InternalAddRange(_psInstanceId, objectsToAdd); @@ -1954,5 +1954,5 @@ protected override void Dispose(bool disposing) } #endregion IDisposable } -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/utils/ParameterBinderExceptions.cs b/src/System.Management.Automation/utils/ParameterBinderExceptions.cs index d99ea1d005d..af368ecf0c6 100644 --- a/src/System.Management.Automation/utils/ParameterBinderExceptions.cs +++ b/src/System.Management.Automation/utils/ParameterBinderExceptions.cs @@ -1048,5 +1048,5 @@ protected ParameterBindingParameterDefaultValueException( #endregion serialization } -} // namespace System.Management.Automation +} diff --git a/src/System.Management.Automation/utils/ParserException.cs b/src/System.Management.Automation/utils/ParserException.cs index 88de64a8f1f..a9207718944 100644 --- a/src/System.Management.Automation/utils/ParserException.cs +++ b/src/System.Management.Automation/utils/ParserException.cs @@ -166,7 +166,7 @@ public override string Message return string.Join(Environment.NewLine + Environment.NewLine, errorsToReport); } } - } // ParseException + } /// /// Defines the exception thrown when a incomplete parse error occurs while parsing msh script text. @@ -264,4 +264,4 @@ public IncompleteParseException(string message, } #endregion ctor } -} // System.Management.Automation +} diff --git a/src/System.Management.Automation/utils/PathUtils.cs b/src/System.Management.Automation/utils/PathUtils.cs index 2177f89dbb3..a2808fd8e3c 100644 --- a/src/System.Management.Automation/utils/PathUtils.cs +++ b/src/System.Management.Automation/utils/PathUtils.cs @@ -172,7 +172,7 @@ internal static void MasterStreamOpen( // NOTE: this call will throw ReportFileOpenFailure(cmdlet, resolvedPath, e); } - } // void MasterStreamOpen + } internal static void ReportFileOpenFailure(Cmdlet cmdlet, string filePath, Exception e) { diff --git a/src/System.Management.Automation/utils/ResourceManagerCache.cs b/src/System.Management.Automation/utils/ResourceManagerCache.cs index 5a082edd1fe..0dd749b7e4e 100644 --- a/src/System.Management.Automation/utils/ResourceManagerCache.cs +++ b/src/System.Management.Automation/utils/ResourceManagerCache.cs @@ -107,7 +107,7 @@ internal static ResourceManager GetResourceManager( "If the manager was not already created, it should have been dynamically created or an exception should have been thrown"); return manager; - } // GetResourceManager + } /// /// Design For Testability -- assert on failed resource lookup @@ -237,6 +237,6 @@ private static ResourceManager InitRMWithAssembly(string baseName, Assembly asse return rm; } - } // class ResourceManagerCache -} // namespace System.Management.Automation + } +} diff --git a/src/System.Management.Automation/utils/RuntimeException.cs b/src/System.Management.Automation/utils/RuntimeException.cs index 7c4e6520454..36da9776a7a 100644 --- a/src/System.Management.Automation/utils/RuntimeException.cs +++ b/src/System.Management.Automation/utils/RuntimeException.cs @@ -307,5 +307,5 @@ internal Token ErrorToken _errorToken = value; } } - } // RuntimeException -} // System.Management.Automation + } +} diff --git a/src/System.Management.Automation/utils/SessionStateExceptions.cs b/src/System.Management.Automation/utils/SessionStateExceptions.cs index 343b7a0faae..5009dcd752d 100644 --- a/src/System.Management.Automation/utils/SessionStateExceptions.cs +++ b/src/System.Management.Automation/utils/SessionStateExceptions.cs @@ -547,7 +547,7 @@ private static string BuildMessage( return StringUtil.Format(resourceStr, a); } #endregion Private - } // SessionStateException + } /// /// SessionStateUnauthorizedAccessException occurs when @@ -638,7 +638,7 @@ protected SessionStateUnauthorizedAccessException( { } #endregion Serialization - } // SessionStateUnauthorizedAccessException + } /// /// ProviderNotFoundException occurs when no provider can be found @@ -732,7 +732,7 @@ protected ProviderNotFoundException( { } #endregion Serialization - } // ProviderNotFoundException + } /// /// ProviderNameAmbiguousException occurs when more than one provider exists @@ -844,7 +844,7 @@ public ReadOnlyCollection PossibleMatches private ReadOnlyCollection _possibleMatches; #endregion public properties - } // ProviderNameAmbiguousException + } /// /// DriveNotFoundException occurs when no drive can be found @@ -926,7 +926,7 @@ protected DriveNotFoundException( { } #endregion Serialization - } // DriveNotFoundException + } /// /// ItemNotFoundException occurs when the path contained no wildcard characters @@ -1010,6 +1010,6 @@ protected ItemNotFoundException( { } #endregion Serialization - } // ItemNotFoundException -} // namespace System.Management.Automation + } +}