Skip to content

Commit 625da6f

Browse files
authored
Remove OnDeserialized and Serializable attributes from Microsoft.Management.UI.Internal project (#25548)
Also removed `EnableUnsafeBinaryFormatterSerialization` property from `powershell-win-core.csproj` to disable the use of `BinaryFormatter`.
1 parent 795df26 commit 625da6f

28 files changed

+0
-58
lines changed

src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/ComparableValueFilterRule.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ namespace Microsoft.Management.UI.Internal
1313
/// The generic parameter.
1414
/// </typeparam>
1515
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
16-
[Serializable]
1716
public abstract class ComparableValueFilterRule<T> : FilterRule where T : IComparable
1817
{
1918
/// <summary>

src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/DoesNotEqualFilterRule.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ namespace Microsoft.Management.UI.Internal
1313
/// The generic parameter.
1414
/// </typeparam>
1515
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
16-
[Serializable]
1716
public class DoesNotEqualFilterRule<T> : EqualsFilterRule<T> where T : IComparable
1817
{
1918
/// <summary>

src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/EqualsFilterRule.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ namespace Microsoft.Management.UI.Internal
1414
/// The generic parameter.
1515
/// </typeparam>
1616
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
17-
[Serializable]
1817
public class EqualsFilterRule<T> : SingleValueComparableValueFilterRule<T> where T : IComparable
1918
{
2019
/// <summary>

src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/FilterRule.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ namespace Microsoft.Management.UI.Internal
99
/// The base class for all filtering rules.
1010
/// </summary>
1111
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
12-
[Serializable]
1312
public abstract class FilterRule : IEvaluate, IDeepCloneable
1413
{
1514
/// <summary>
@@ -69,7 +68,6 @@ public object DeepClone()
6968
/// <summary>
7069
/// Occurs when the values of this rule changes.
7170
/// </summary>
72-
[field: NonSerialized]
7371
public event EventHandler EvaluationResultInvalidated;
7472

7573
/// <summary>

src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/IsBetweenFilterRule.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ namespace Microsoft.Management.UI.Internal
1616
/// The generic parameter.
1717
/// </typeparam>
1818
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
19-
[Serializable]
2019
public class IsBetweenFilterRule<T> : ComparableValueFilterRule<T> where T : IComparable
2120
{
2221
#region Properties
@@ -122,13 +121,6 @@ private void Value_PropertyChanged(object sender, PropertyChangedEventArgs e)
122121
}
123122
}
124123

125-
[OnDeserialized]
126-
private void Initialize(StreamingContext context)
127-
{
128-
this.StartValue.PropertyChanged += this.Value_PropertyChanged;
129-
this.EndValue.PropertyChanged += this.Value_PropertyChanged;
130-
}
131-
132124
#endregion Value Change Handlers
133125
}
134126
}

src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/IsEmptyFilterRule.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace Microsoft.Management.UI.Internal
1010
/// is empty or not.
1111
/// </summary>
1212
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
13-
[Serializable]
1413
public class IsEmptyFilterRule : FilterRule
1514
{
1615
/// <summary>

src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/IsGreaterThanFilterRule.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ namespace Microsoft.Management.UI.Internal
1414
/// The generic parameter.
1515
/// </typeparam>
1616
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
17-
[Serializable]
1817
public class IsGreaterThanFilterRule<T> : SingleValueComparableValueFilterRule<T> where T : IComparable
1918
{
2019
/// <summary>

src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/IsLessThanFilterRule.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ namespace Microsoft.Management.UI.Internal
1414
/// The generic parameter.
1515
/// </typeparam>
1616
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
17-
[Serializable]
1817
public class IsLessThanFilterRule<T> : SingleValueComparableValueFilterRule<T> where T : IComparable
1918
{
2019
/// <summary>

src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/IsNotEmptyFilterRule.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace Microsoft.Management.UI.Internal
1010
/// is empty or not.
1111
/// </summary>
1212
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
13-
[Serializable]
1413
public class IsNotEmptyFilterRule : IsEmptyFilterRule
1514
{
1615
/// <summary>

src/Microsoft.Management.UI.Internal/ManagementList/FilterCore/FilterRules/IsNotEmptyValidationRule.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ namespace Microsoft.Management.UI.Internal
99
/// The IsNotEmptyValidationRule checks a value to see if a value is not empty.
1010
/// </summary>
1111
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
12-
[Serializable]
1312
public class IsNotEmptyValidationRule : DataErrorInfoValidationRule
1413
{
1514
#region Properties

0 commit comments

Comments
 (0)