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
4 changes: 2 additions & 2 deletions .globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ dotnet_diagnostic.CA1065.severity = warning
dotnet_diagnostic.CA1066.severity = none

# CA1067: Override Object.Equals(object) when implementing IEquatable<T>
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1067
dotnet_diagnostic.CA1067.severity = suggestion
# # https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1067
dotnet_diagnostic.CA1067.severity = warning

# CA1068: CancellationToken parameters must come last
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1068
Expand Down
13 changes: 13 additions & 0 deletions src/System.Management.Automation/engine/EventManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2042,6 +2042,19 @@ private ScriptBlock CreateBoundScriptBlock(ScriptBlock scriptAction)

#region IComparable<PSEventSubscriber> Members

/// <summary>
/// Determines whether the specified object is equal to the current object.
/// </summary>
/// <param name="obj">The object to compare with the current object.</param>
/// <returns>
/// <see langword="true"/> if the specified object is equal to the current object;
/// otherwise, <see langword="false"/>.
/// </returns>
public override bool Equals(object obj)
{
return obj is PSEventSubscriber es && Equals(es);
}

/// <summary>
/// Determines if two PSEventSubscriber instances are equal
/// <param name="other">
Expand Down