Remove explicit IDE1005 suppressions (#21217)

This commit is contained in:
xtqqczze 2024-07-16 00:11:58 +01:00 committed by GitHub
parent 390a341a61
commit 2e93c18769
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 0 additions and 29 deletions

View File

@ -2,7 +2,6 @@
// Licensed under the MIT License. // Licensed under the MIT License.
using System; using System;
using System.Diagnostics.CodeAnalysis;
namespace Microsoft.Management.UI.Internal namespace Microsoft.Management.UI.Internal
{ {
@ -62,14 +61,12 @@ namespace Microsoft.Management.UI.Internal
/// </summary> /// </summary>
protected void NotifyEvaluationResultInvalidated() protected void NotifyEvaluationResultInvalidated()
{ {
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
var eh = this.EvaluationResultInvalidated; var eh = this.EvaluationResultInvalidated;
if (eh != null) if (eh != null)
{ {
eh(this, new EventArgs()); eh(this, new EventArgs());
} }
#pragma warning restore IDE1005
} }
#endregion #endregion

View File

@ -3,7 +3,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization; using System.Globalization;
using System.Windows.Data; using System.Windows.Data;
@ -210,14 +209,12 @@ namespace Microsoft.Management.UI.Internal
/// </param> /// </param>
protected void NotifySelectedValueChanged(T oldValue, T newValue) protected void NotifySelectedValueChanged(T oldValue, T newValue)
{ {
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
EventHandler<PropertyChangedEventArgs<T>> eh = this.SelectedValueChanged; EventHandler<PropertyChangedEventArgs<T>> eh = this.SelectedValueChanged;
if (eh != null) if (eh != null)
{ {
eh(this, new PropertyChangedEventArgs<T>(oldValue, newValue)); eh(this, new PropertyChangedEventArgs<T>(oldValue, newValue));
} }
#pragma warning restore IDE1005
} }
#endregion NotifySelectedValueChanged #endregion NotifySelectedValueChanged

View File

@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel; using System.ComponentModel;
using System.Diagnostics; using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization; using System.Globalization;
namespace Microsoft.Management.UI.Internal namespace Microsoft.Management.UI.Internal
@ -252,14 +251,12 @@ namespace Microsoft.Management.UI.Internal
/// </param> /// </param>
protected void NotifyPropertyChanged(string propertyName) protected void NotifyPropertyChanged(string propertyName)
{ {
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
PropertyChangedEventHandler eh = this.PropertyChanged; PropertyChangedEventHandler eh = this.PropertyChanged;
if (eh != null) if (eh != null)
{ {
eh(this, new PropertyChangedEventArgs(propertyName)); eh(this, new PropertyChangedEventArgs(propertyName));
} }
#pragma warning restore IDE1005
} }
#endregion NotifyPropertyChanged #endregion NotifyPropertyChanged

View File

@ -70,14 +70,12 @@ namespace Microsoft.Management.UI.Internal
/// </param> /// </param>
protected void NotifyPropertyChanged(string propertyName) protected void NotifyPropertyChanged(string propertyName)
{ {
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
PropertyChangedEventHandler eh = this.PropertyChanged; PropertyChangedEventHandler eh = this.PropertyChanged;
if (eh != null) if (eh != null)
{ {
eh(this, new PropertyChangedEventArgs(propertyName)); eh(this, new PropertyChangedEventArgs(propertyName));
} }
#pragma warning restore IDE1005
} }
#endregion NotifyPropertyChanged #endregion NotifyPropertyChanged

View File

@ -204,13 +204,11 @@ namespace Microsoft.Management.UI.Internal
/// </summary> /// </summary>
protected virtual void NotifyFilterExpressionChanged() protected virtual void NotifyFilterExpressionChanged()
{ {
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
EventHandler eh = this.FilterExpressionChanged; EventHandler eh = this.FilterExpressionChanged;
if (eh != null) if (eh != null)
{ {
eh(this, new EventArgs()); eh(this, new EventArgs());
} }
#pragma warning restore IDE1005
} }
private void Controller_FilterExpressionChanged(object sender, EventArgs e) private void Controller_FilterExpressionChanged(object sender, EventArgs e)

View File

@ -260,13 +260,11 @@ namespace Microsoft.Management.UI.Internal
/// </summary> /// </summary>
protected virtual void NotifyFilterExpressionChanged() protected virtual void NotifyFilterExpressionChanged()
{ {
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
EventHandler eh = this.FilterExpressionChanged; EventHandler eh = this.FilterExpressionChanged;
if (eh != null) if (eh != null)
{ {
eh(this, new EventArgs()); eh(this, new EventArgs());
} }
#pragma warning restore IDE1005
} }
#endregion Notify Filter Expression Changed #endregion Notify Filter Expression Changed

View File

@ -100,15 +100,11 @@ namespace Microsoft.Management.UI.Internal
{ {
Debug.Assert(!string.IsNullOrEmpty(propertyName), "not null"); Debug.Assert(!string.IsNullOrEmpty(propertyName), "not null");
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
PropertyChangedEventHandler eh = this.PropertyChanged; PropertyChangedEventHandler eh = this.PropertyChanged;
if (eh != null) if (eh != null)
{ {
eh(this, new PropertyChangedEventArgs(propertyName)); eh(this, new PropertyChangedEventArgs(propertyName));
} }
#pragma warning restore IDE1005s
} }
#endregion Public Methods #endregion Public Methods

View File

@ -60,13 +60,11 @@ namespace Microsoft.Management.UI.Internal
/// </summary> /// </summary>
protected virtual void NotifyFilterExpressionChanged() protected virtual void NotifyFilterExpressionChanged()
{ {
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
EventHandler eh = this.FilterExpressionChanged; EventHandler eh = this.FilterExpressionChanged;
if (eh != null) if (eh != null)
{ {
eh(this, new EventArgs()); eh(this, new EventArgs());
} }
#pragma warning restore IDE1005s
} }
#endregion #endregion

View File

@ -550,8 +550,6 @@ namespace Microsoft.PowerShell.Commands.ShowCommandInternal
return returnValue; return returnValue;
} }
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
/// <summary> /// <summary>
/// Called to trigger the event fired when help is needed for the command. /// Called to trigger the event fired when help is needed for the command.
/// </summary> /// </summary>
@ -627,8 +625,6 @@ namespace Microsoft.PowerShell.Commands.ShowCommandInternal
} }
} }
#pragma warning restore IDE1005
/// <summary> /// <summary>
/// Called when the PropertyChanged event is triggered on the SelectedParameterSet. /// Called when the PropertyChanged event is triggered on the SelectedParameterSet.
/// </summary> /// </summary>

View File

@ -363,13 +363,11 @@ namespace Microsoft.PowerShell.Commands.ShowCommandInternal
/// <param name="propertyName">The changed property.</param> /// <param name="propertyName">The changed property.</param>
private void OnNotifyPropertyChanged(string propertyName) private void OnNotifyPropertyChanged(string propertyName)
{ {
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
PropertyChangedEventHandler handler = this.PropertyChanged; PropertyChangedEventHandler handler = this.PropertyChanged;
if (handler != null) if (handler != null)
{ {
handler(this, new PropertyChangedEventArgs(propertyName)); handler(this, new PropertyChangedEventArgs(propertyName));
} }
#pragma warning restore IDE1005
} }
/// <summary> /// <summary>

View File

@ -262,13 +262,11 @@ namespace Microsoft.PowerShell.Commands.ShowCommandInternal
/// <param name="propertyName">The changed property.</param> /// <param name="propertyName">The changed property.</param>
private void OnNotifyPropertyChanged(string propertyName) private void OnNotifyPropertyChanged(string propertyName)
{ {
#pragma warning disable IDE1005 // IDE1005: Delegate invocation can be simplified.
PropertyChangedEventHandler handler = this.PropertyChanged; PropertyChangedEventHandler handler = this.PropertyChanged;
if (handler != null) if (handler != null)
{ {
handler(this, new PropertyChangedEventArgs(propertyName)); handler(this, new PropertyChangedEventArgs(propertyName));
} }
#pragma warning restore IDE1005
} }
} }
} }