Skip to content
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public enum ProtocolType
/// can subsequently use to create one or more CimSession connections. The
/// options object holds the CIM Session information that is less commonly set
/// and used by the IT Pro, and most commonly defaulted.
///
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this line makes it more readable as there's two paragraphs

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are many such places. Since I used automatic replacement, it is really impossible to fix it everywhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to craft a regex so that if the content of the last newline doesn't end with > then keep the whitespace?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I close the PR and open new one #7401 with the new regex.

/// The Cmdlet has two parameter sets, one for WMMan options and one for DCOM
/// options. Depending on the arguments the Cmdlet will return an instance of
/// DComSessionOptions or WSManSessionOptions, which derive from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,12 @@ public class AddContentCommand : WriteContentCommandBase
/// Seeks to the end of the writer stream in each of the writers in the
/// content holders.
/// </summary>
///
/// <param name="contentHolders">
/// The content holders that contain the writers to be moved.
/// </param>
///
/// <exception cref="ProviderInvocationException">
/// If calling Seek on the content writer throws an exception.
/// </exception>
///
internal override void SeekContentPosition(List<ContentHolder> contentHolders)
{
foreach (ContentHolder holder in contentHolders)
Expand Down Expand Up @@ -68,15 +65,12 @@ internal override void SeekContentPosition(List<ContentHolder> contentHolders)
/// <summary>
/// Makes the call to ShouldProcess with appropriate action and target strings.
/// </summary>
///
/// <param name="path">
/// The path to the item on which the content will be added.
/// </param>
///
/// <returns>
/// True if the action should continue or false otherwise.
/// </returns>
///
internal override bool CallShouldProcess(string path)
{
string action = NavigationResources.AddContentAction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,13 @@ protected override bool ProviderSupportsShouldProcess
/// that require dynamic parameters should override this method and return the
/// dynamic parameter object.
/// </summary>
///
/// <param name="context">
/// The context under which the command is running.
/// </param>
///
/// <returns>
/// An object representing the dynamic parameters for the cmdlet or null if there
/// are none.
/// </returns>
///
internal override object GetDynamicParameters(CmdletProviderContext context)
{
if (Path != null && Path.Length > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public string[] LiteralPath
/// <summary>
/// The properties to clear from the item
/// </summary>
///
[Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true)]
public string Name
{
Expand All @@ -77,16 +76,13 @@ public string Name
/// that require dynamic parameters should override this method and return the
/// dynamic parameter object.
/// </summary>
///
/// <param name="context">
/// The context under which the command is running.
/// </param>
///
/// <returns>
/// An object representing the dynamic parameters for the cmdlet or null if there
/// are none.
/// </returns>
///
internal override object GetDynamicParameters(CmdletProviderContext context)
{
Collection<string> propertyCollection = new Collection<string>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public RestartComputerTimeoutException() : base() { }
/// <summary>
/// Constructs a RestartComputerTimeoutException
/// </summary>
///
/// <param name="message">
/// The message used in the exception.
/// </param>
Expand All @@ -86,11 +85,9 @@ public RestartComputerTimeoutException(string message) : base(message) { }
/// <summary>
/// Constructs a RestartComputerTimeoutException
/// </summary>
///
/// <param name="message">
/// The message used in the exception.
/// </param>
///
/// <param name="innerException">
/// An exception that led to this exception.
/// </param>
Expand All @@ -100,11 +97,9 @@ public RestartComputerTimeoutException(string message, Exception innerException)
/// <summary>
/// Serialization constructor for class RestartComputerTimeoutException
/// </summary>
///
/// <param name="info">
/// serialization information
/// </param>
///
/// <param name="context">
/// streaming context
/// </param>
Expand All @@ -123,11 +118,9 @@ private RestartComputerTimeoutException(SerializationInfo info, StreamingContext
/// <summary>
/// Serializes the RestartComputerTimeoutException.
/// </summary>
///
/// <param name="info">
/// serialization information
/// </param>
///
/// <param name="context">
/// streaming context
/// </param>
Expand Down Expand Up @@ -1826,7 +1819,6 @@ internal static string GetRandomPassword(int passwordLength)

/// <summary>
/// Gets the Scope
///
/// </summary>
/// <param name="computer"></param>
/// <param name="namespaceParameter"></param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public override string[] Exclude
/// <summary>
/// Gets or sets the force property
/// </summary>
///
/// <remarks>
/// Gives the provider guidance on how vigorous it should be about performing
/// the operation. If true, the provider should do everything possible to perform
Expand All @@ -84,7 +83,6 @@ public override string[] Exclude
/// the destination is read-only, if force is true, the provider should copy over
/// the existing read-only file. If force is false, the provider should write an error.
/// </remarks>
///
[Parameter]
public override SwitchParameter Force
{
Expand All @@ -104,29 +102,23 @@ public override SwitchParameter Force
/// An array of content holder objects that contain the path information
/// and content readers/writers for the item represented by the path information.
/// </summary>
///
internal List<ContentHolder> contentStreams = new List<ContentHolder>();

/// <summary>
/// Wraps the content into a PSObject and adds context information as notes
/// </summary>
///
/// <param name="content">
/// The content being written out.
/// </param>
///
/// <param name="readCount">
/// The number of blocks that have been read so far.
/// </param>
///
/// <param name="pathInfo">
/// The context the content was retrieved from.
/// </param>
///
/// <param name="context">
/// The context the command is being run under.
/// </param>
///
internal void WriteContentObject(object content, long readCount, PathInfo pathInfo, CmdletProviderContext context)
{
Dbg.Diagnostics.Assert(
Expand Down Expand Up @@ -250,11 +242,9 @@ internal class ContentPathsCache
/// <summary>
/// Constructs a content cache item.
/// </summary>
///
/// <param name="pathInfo">
/// The path information for which the cache will be bound.
/// </param>
///
public ContentPathsCache(PathInfo pathInfo)
{
PathInfo = pathInfo;
Expand All @@ -263,51 +253,42 @@ public ContentPathsCache(PathInfo pathInfo)
/// <summary>
/// The path information for the cached item.
/// </summary>
///
public PathInfo PathInfo { get; }

/// <summary>
/// The cached PSPath of the item.
/// </summary>
///
public String PSPath { get; set; }

/// <summary>
/// The cached parent path of the item.
/// </summary>
///
public String ParentPath { get; set; }

/// <summary>
/// The cached drive for the item.
/// </summary>
///
public PSDriveInfo Drive { get; set; }

/// <summary>
/// The cached provider of the item.
/// </summary>
///
public ProviderInfo Provider { get; set; }

/// <summary>
/// The cached child name of the item.
/// </summary>
///
public String ChildName { get; set; }

/// <summary>
/// Attaches the cached notes to the specified PSObject.
/// </summary>
///
/// <param name="content">
/// The PSObject to attached the cached notes to.
/// </param>
///
/// <returns>
/// The PSObject that was passed in with the cached notes added.
/// </returns>
///
public PSObject AttachNotes(PSObject content)
{
// Construct a provider qualified path as the Path note
Expand Down Expand Up @@ -351,7 +332,6 @@ public PSObject AttachNotes(PSObject content)
/// A struct to hold the path information and the content readers/writers
/// for an item.
/// </summary>
///
internal struct ContentHolder
{
internal ContentHolder(
Expand Down Expand Up @@ -468,16 +448,13 @@ internal void CloseContent(List<ContentHolder> contentHolders, bool disposing)
/// Overridden by derived classes to support ShouldProcess with
/// the appropriate information.
/// </summary>
///
/// <param name="path">
/// The path to the item from which the content writer will be
/// retrieved.
/// </param>
///
/// <returns>
/// True if the action should continue or false otherwise.
/// </returns>
///
internal virtual bool CallShouldProcess(string path)
{
return true;
Expand All @@ -486,11 +463,9 @@ internal virtual bool CallShouldProcess(string path)
/// <summary>
/// Gets the IContentReaders for the current path(s)
/// </summary>
///
/// <returns>
/// An array of IContentReaders for the current path(s)
/// </returns>
///
internal List<ContentHolder> GetContentReaders(
string[] readerPaths,
CmdletProviderContext currentCommandContext)
Expand Down Expand Up @@ -572,28 +547,22 @@ internal List<ContentHolder> GetContentReaders(
/// <summary>
/// Resolves the specified paths to PathInfo objects
/// </summary>
///
/// <param name="pathsToResolve">
/// The paths to be resolved. Each path may contain glob characters.
/// </param>
///
/// <param name="allowNonexistingPaths">
/// If true, resolves the path even if it doesn't exist.
/// </param>
///
/// <param name="allowEmptyResult">
/// If true, allows a wildcard that returns no results.
/// </param>
///
/// <param name="currentCommandContext">
/// The context under which the command is running.
/// </param>
///
/// <returns>
/// An array of PathInfo objects that are the resolved paths for the
/// <paramref name="pathsToResolve"/> parameter.
/// </returns>
///
internal Collection<PathInfo> ResolvePaths(
string[] pathsToResolve,
bool allowNonexistingPaths,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,13 @@ public string[] LiteralPath
/// <summary>
/// The name of the property to create on the item
/// </summary>
///
[Parameter(Position = 2, Mandatory = true, ValueFromPipelineByPropertyName = true)]
[Alias("PSProperty")]
public string Name { get; set; }

/// <summary>
/// The path to the destination item to copy the property to.
/// </summary>
///
[Parameter(Mandatory = true, Position = 1, ValueFromPipelineByPropertyName = true)]
public string Destination { get; set; }

Expand All @@ -62,16 +60,13 @@ public string[] LiteralPath
/// that require dynamic parameters should override this method and return the
/// dynamic parameter object.
/// </summary>
///
/// <param name="context">
/// The context under which the command is running.
/// </param>
///
/// <returns>
/// An object representing the dynamic parameters for the cmdlet or null if there
/// are none.
/// </returns>
///
internal override object GetDynamicParameters(CmdletProviderContext context)
{
if (Path != null && Path.Length > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,6 @@ public class NewEventLogCommand : PSCmdlet
/// <summary>
/// The following is the definition of the input parameter "LogName".
/// Specifies the name of the log
///
/// </summary>
[Parameter(Mandatory = true,
Position = 0)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ namespace Microsoft.PowerShell.Commands
/// The get-childitem command class.
/// This command lists the contents of a container
/// </summary>
///
/// <remarks>
/// </remarks>
///
[Cmdlet(VerbsCommon.Get, "ChildItem", DefaultParameterSetName = "Items", SupportsTransactions = true, HelpUri = "https://go.microsoft.com/fwlink/?LinkID=113308")]
public class GetChildItemCommand : CoreCommandBase
{
Expand Down Expand Up @@ -158,7 +154,6 @@ public uint Depth
/// <summary>
/// Gets or sets the force property
/// </summary>
///
/// <remarks>
/// Gives the provider guidance on how vigorous it should be about performing
/// the operation. If true, the provider should do everything possible to perform
Expand All @@ -168,7 +163,6 @@ public uint Depth
/// the destination is read-only, if force is true, the provider should copy over
/// the existing read-only file. If force is false, the provider should write an error.
/// </remarks>
///
[Parameter]
public override SwitchParameter Force
{
Expand Down Expand Up @@ -203,16 +197,13 @@ public SwitchParameter Name
/// that require dynamic parameters should override this method and return the
/// dynamic parameter object.
/// </summary>
///
/// <param name="context">
/// The context under which the command is running.
/// </param>
///
/// <returns>
/// An object representing the dynamic parameters for the cmdlet or null if there
/// are none.
/// </returns>
///
internal override object GetDynamicParameters(CmdletProviderContext context)
{
object result = null;
Expand Down
Loading