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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/System.Management.Automation/engine/Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace System.Management.Automation
/// <see cref="ValidateArgumentsAttribute"/> validates the argument as a whole. If the argument value may
/// be an enumerable, you can derive from <see cref="ValidateEnumeratedArgumentsAttribute"/>
/// which will take care of unrolling the enumerable and validate each element individually.
/// It is also recommended to override <see cref="System.Object.ToString"/> to return a readable string
/// It is also recommended to override <see cref="object.ToString"/> to return a readable string

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The System.Object full name looks better and matches what is in the documentation. I think it's right. Can we change only the code but not the XML comments?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We would need #pragma warning disable IDE0049 // Simplify Names which would surely look worse. The documentation appears to be built automatically from these comments.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Generated docs look good.

/// similar to the attribute declaration, for example "[ValidateRangeAttribute(5,10)]".
/// If this attribute is applied to a string parameter, the string command argument will be validated.
/// If this attribute is applied to a string[] parameter, the string[] command argument will be validated.
Expand Down Expand Up @@ -154,7 +154,7 @@ protected ValidateArgumentsAttribute()
/// <seealso cref="ValidateEnumeratedArgumentsAttribute"/> and override the
/// <seealso cref="ValidateEnumeratedArgumentsAttribute.ValidateElement"/>
/// abstract method, after which they can apply the attribute to their parameters.
/// It is also recommended to override <see cref="System.Object.ToString"/> to return a readable string
/// It is also recommended to override <see cref="object.ToString"/> to return a readable string
/// similar to the attribute declaration, for example "[ValidateRangeAttribute(5,10)]".
/// If this attribute is applied to a string parameter, the string command argument will be validated.
/// If this attribute is applied to a string[] parameter, each string command argument will be validated.
Expand Down Expand Up @@ -2292,7 +2292,7 @@ public ValidateNotNullOrWhiteSpaceAttribute()
/// <see cref="ArgumentTransformationAttribute"/> and override the
/// <see cref="ArgumentTransformationAttribute.Transform"/> abstract method, after which they
/// can apply the attribute to their parameters.
/// It is also recommended to override <see cref="System.Object.ToString"/> to return a readable
/// It is also recommended to override <see cref="object.ToString"/> to return a readable
/// string similar to the attribute declaration, for example "[ValidateRangeAttribute(5,10)]".
/// If multiple transformations are defined on a parameter, they will be invoked in series,
/// each getting the output of the previous transformation.
Expand Down
4 changes: 2 additions & 2 deletions src/System.Management.Automation/engine/ErrorPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ internal Exception TextLookupError

#region ToString
/// <summary>
/// As <see cref="System.Object.ToString()"/>
/// As <see cref="object.ToString()"/>
/// </summary>
/// <returns>Developer-readable identifier.</returns>
public override string ToString()
Expand Down Expand Up @@ -1677,7 +1677,7 @@ private string GetInvocationTypeName()

#region ToString
/// <summary>
/// As <see cref="System.Object.ToString()"/>
/// As <see cref="object.ToString()"/>
/// </summary>
/// <returns>Developer-readable identifier.</returns>
public override string ToString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ internal ProgressRecord(ProgressRecord other)
}

/// <summary>
/// Overrides <see cref="System.Object.ToString"/>
/// Overrides <see cref="object.ToString"/>
/// </summary>
/// <returns>
/// "parent = a id = b act = c stat = d cur = e pct = f sec = g type = h" where
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public int Y
}

/// <summary>
/// Overrides <see cref="System.Object.ToString"/>
/// Overrides <see cref="object.ToString"/>
/// </summary>
/// <returns>
/// "a,b" where a and b are the values of the X and Y properties.
Expand All @@ -75,7 +75,7 @@ public override
}

/// <summary>
/// Overrides <see cref="System.Object.Equals(object)"/>
/// Overrides <see cref="object.Equals(object)"/>
/// </summary>
/// <param name="obj">
/// object to be compared for equality.
Expand All @@ -99,7 +99,7 @@ public override
}

/// <summary>
/// Overrides <see cref="System.Object.GetHashCode"/>
/// Overrides <see cref="object.GetHashCode"/>
/// </summary>
/// <returns>
/// Hash code for this instance.
Expand Down Expand Up @@ -248,7 +248,7 @@ public int Height
}

/// <summary>
/// Overloads <see cref="System.Object.ToString"/>
/// Overloads <see cref="object.ToString"/>
/// </summary>
/// <returns>
/// "a,b" where a and b are the values of the Width and Height properties.
Expand All @@ -261,7 +261,7 @@ public override
}

/// <summary>
/// Overrides <see cref="System.Object.Equals(object)"/>
/// Overrides <see cref="object.Equals(object)"/>
/// </summary>
/// <param name="obj">
/// object to be compared for equality.
Expand All @@ -285,7 +285,7 @@ public override
}

/// <summary>
/// Overrides <see cref="System.Object.GetHashCode"/>
/// Overrides <see cref="object.GetHashCode"/>
/// </summary>
/// <returns>
/// Hash code for this instance.
Expand Down Expand Up @@ -557,7 +557,7 @@ bool keyDown
}

/// <summary>
/// Overloads <see cref="System.Object.ToString"/>
/// Overloads <see cref="object.ToString"/>
/// </summary>
/// <returns>
/// "a,b,c,d" where a, b, c, and d are the values of the VirtualKeyCode, Character, ControlKeyState, and KeyDown properties.
Expand All @@ -569,7 +569,7 @@ public override
return string.Create(CultureInfo.InvariantCulture, $"{VirtualKeyCode},{Character},{ControlKeyState},{KeyDown}");
}
/// <summary>
/// Overrides <see cref="System.Object.Equals(object)"/>
/// Overrides <see cref="object.Equals(object)"/>
/// </summary>
/// <param name="obj">
/// object to be compared for equality.
Expand All @@ -593,7 +593,7 @@ public override
}

/// <summary>
/// Overrides <see cref="System.Object.GetHashCode"/>
/// Overrides <see cref="object.GetHashCode"/>
/// </summary>
/// <returns>
/// Hash code for this instance.
Expand Down Expand Up @@ -787,7 +787,7 @@ public int Bottom
}

/// <summary>
/// Overloads <see cref="System.Object.ToString"/>
/// Overloads <see cref="object.ToString"/>
/// </summary>
/// <returns>
/// "a,b ; c,d" where a, b, c, and d are values of the Left, Top, Right, and Bottom properties.
Expand All @@ -800,7 +800,7 @@ public override
}

/// <summary>
/// Overrides <see cref="System.Object.Equals(object)"/>
/// Overrides <see cref="object.Equals(object)"/>
/// </summary>
/// <param name="obj">
/// object to be compared for equality.
Expand All @@ -824,7 +824,7 @@ public override
}

/// <summary>
/// Overrides <see cref="System.Object.GetHashCode"/>
/// Overrides <see cref="object.GetHashCode"/>
/// </summary>
/// <returns>
/// Hash code for this instance.
Expand Down Expand Up @@ -1015,7 +1015,7 @@ public BufferCellType BufferCellType
}

/// <summary>
/// Overloads <see cref="System.Object.ToString"/>
/// Overloads <see cref="object.ToString"/>
/// </summary>
/// <returns>
/// "'a' b c d" where a, b, c, and d are the values of the Character, ForegroundColor, BackgroundColor, and Type properties.
Expand All @@ -1028,7 +1028,7 @@ public override
}

/// <summary>
/// Overrides <see cref="System.Object.Equals(object)"/>
/// Overrides <see cref="object.Equals(object)"/>
/// </summary>
/// <param name="obj">
/// object to be compared for equality.
Expand All @@ -1052,7 +1052,7 @@ public override
}

/// <summary>
/// Overrides <see cref="System.Object.GetHashCode"/>
/// Overrides <see cref="object.GetHashCode"/>
/// <!-- consider (ForegroundColor XOR BackgroundColor) the high-order part of a 32-bit int,
/// and Character the lower order half. Then use the int32.GetHashCode.-->
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ protected virtual object RenameItemDynamicParameters(string path, string newName
///
/// The <paramref name="newItemValue"/> parameter can be any type of object that the provider can use
/// to create the item. It is recommended that the provider accept at a minimum strings, and an instance
/// of the type of object that would be returned from GetItem() for this path. <see cref="LanguagePrimitives.ConvertTo(System.Object, System.Type)"/>
/// of the type of object that would be returned from GetItem() for this path. <see cref="LanguagePrimitives.ConvertTo(object, System.Type)"/>
/// can be used to convert some types to the desired type.
///
/// The default implementation of this method throws an <see cref="System.Management.Automation.PSNotSupportedException"/>.
Expand Down