Remove explicit IDE1005 suppressions (#21217)

This commit is contained in:
xtqqczze
2024-07-15 16:11:58 -07:00
committed by GitHub
parent 390a341a61
commit 2e93c18769
11 changed files with 0 additions and 29 deletions
@@ -2,7 +2,6 @@
// Licensed under the MIT License.
using System;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.Management.UI.Internal
{
@@ -62,14 +61,12 @@ namespace Microsoft.Management.UI.Internal
/// </summary>
protected void NotifyEvaluationResultInvalidated()
{
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
var eh = this.EvaluationResultInvalidated;
if (eh != null)
{
eh(this, new EventArgs());
}
#pragma warning restore IDE1005
}
#endregion
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Windows.Data;
@@ -210,14 +209,12 @@ namespace Microsoft.Management.UI.Internal
/// </param>
protected void NotifySelectedValueChanged(T oldValue, T newValue)
{
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
EventHandler<PropertyChangedEventArgs<T>> eh = this.SelectedValueChanged;
if (eh != null)
{
eh(this, new PropertyChangedEventArgs<T>(oldValue, newValue));
}
#pragma warning restore IDE1005
}
#endregion NotifySelectedValueChanged
@@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
namespace Microsoft.Management.UI.Internal
@@ -252,14 +251,12 @@ namespace Microsoft.Management.UI.Internal
/// </param>
protected void NotifyPropertyChanged(string propertyName)
{
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
PropertyChangedEventHandler eh = this.PropertyChanged;
if (eh != null)
{
eh(this, new PropertyChangedEventArgs(propertyName));
}
#pragma warning restore IDE1005
}
#endregion NotifyPropertyChanged
@@ -70,14 +70,12 @@ namespace Microsoft.Management.UI.Internal
/// </param>
protected void NotifyPropertyChanged(string propertyName)
{
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
PropertyChangedEventHandler eh = this.PropertyChanged;
if (eh != null)
{
eh(this, new PropertyChangedEventArgs(propertyName));
}
#pragma warning restore IDE1005
}
#endregion NotifyPropertyChanged
@@ -204,13 +204,11 @@ namespace Microsoft.Management.UI.Internal
/// </summary>
protected virtual void NotifyFilterExpressionChanged()
{
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
EventHandler eh = this.FilterExpressionChanged;
if (eh != null)
{
eh(this, new EventArgs());
}
#pragma warning restore IDE1005
}
private void Controller_FilterExpressionChanged(object sender, EventArgs e)
@@ -260,13 +260,11 @@ namespace Microsoft.Management.UI.Internal
/// </summary>
protected virtual void NotifyFilterExpressionChanged()
{
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
EventHandler eh = this.FilterExpressionChanged;
if (eh != null)
{
eh(this, new EventArgs());
}
#pragma warning restore IDE1005
}
#endregion Notify Filter Expression Changed
@@ -100,15 +100,11 @@ namespace Microsoft.Management.UI.Internal
{
Debug.Assert(!string.IsNullOrEmpty(propertyName), "not null");
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
PropertyChangedEventHandler eh = this.PropertyChanged;
if (eh != null)
{
eh(this, new PropertyChangedEventArgs(propertyName));
}
#pragma warning restore IDE1005s
}
#endregion Public Methods
@@ -60,13 +60,11 @@ namespace Microsoft.Management.UI.Internal
/// </summary>
protected virtual void NotifyFilterExpressionChanged()
{
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
EventHandler eh = this.FilterExpressionChanged;
if (eh != null)
{
eh(this, new EventArgs());
}
#pragma warning restore IDE1005s
}
#endregion
@@ -550,8 +550,6 @@ namespace Microsoft.PowerShell.Commands.ShowCommandInternal
return returnValue;
}
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
/// <summary>
/// Called to trigger the event fired when help is needed for the command.
/// </summary>
@@ -627,8 +625,6 @@ namespace Microsoft.PowerShell.Commands.ShowCommandInternal
}
}
#pragma warning restore IDE1005
/// <summary>
/// Called when the PropertyChanged event is triggered on the SelectedParameterSet.
/// </summary>
@@ -363,13 +363,11 @@ namespace Microsoft.PowerShell.Commands.ShowCommandInternal
/// <param name="propertyName">The changed property.</param>
private void OnNotifyPropertyChanged(string propertyName)
{
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
PropertyChangedEventHandler handler = this.PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
#pragma warning restore IDE1005
}
/// <summary>
@@ -262,13 +262,11 @@ namespace Microsoft.PowerShell.Commands.ShowCommandInternal
/// <param name="propertyName">The changed property.</param>
private void OnNotifyPropertyChanged(string propertyName)
{
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
PropertyChangedEventHandler handler = this.PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
#pragma warning restore IDE1005
}
}
}