Skip to content

Commit

Permalink
[DI-1343] Removing Obsolete Code (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidJGapCR authored Apr 22, 2024
1 parent 71798c1 commit de8491e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 45 deletions.
16 changes: 0 additions & 16 deletions DataImport.Common/Preprocessors/ExternalPreprocessorException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;

namespace DataImport.Common.Preprocessors
{
[Serializable]
public class ExternalPreprocessorException : AggregateException
{
public string ProcessName { get; }
Expand Down Expand Up @@ -61,19 +59,5 @@ public ExternalPreprocessorException(string message)

public ExternalPreprocessorException(string message, params Exception[] innerExceptions)
: base(message, innerExceptions) { }

#pragma warning disable S1133 // Deprecated code should be removed
[Obsolete("Obsolete for NET 8", DiagnosticId = "SYSLIB0051")]
protected ExternalPreprocessorException(SerializationInfo info, StreamingContext context)
: base(info, context) { }

[Obsolete("Obsolete for NET 8", DiagnosticId = "SYSLIB0051")]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue(nameof(ProcessName), ProcessName);
info.AddValue(nameof(Errors), Errors);
}
#pragma warning disable S1133 // Deprecated code should be removed
}
}
14 changes: 0 additions & 14 deletions DataImport.Common/Preprocessors/PowerShellProcessException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using System.Runtime.Serialization;

namespace DataImport.Common.Preprocessors
{
[Serializable]
public class PowerShellProcessException : AggregateException
{
public IEnumerable<ErrorRecord> Errors { get; }
Expand Down Expand Up @@ -44,17 +42,5 @@ public PowerShellProcessException(string message)

public PowerShellProcessException(string message, params Exception[] innerExceptions)
: base(message, innerExceptions) { }
#pragma warning disable S1133 // Deprecated code should be removed
[Obsolete("Obsolete for NET 8", DiagnosticId = "SYSLIB0051")]
protected PowerShellProcessException(SerializationInfo info, StreamingContext context)
: base(info, context) { }

[Obsolete("Obsolete for NET 8", DiagnosticId = "SYSLIB0051")]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue(nameof(Errors), Errors);
}
#pragma warning disable S1133 // Deprecated code should be removed
}
}
15 changes: 0 additions & 15 deletions DataImport.Common/Preprocessors/PowerShellValidateException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
using System;
using System.Collections.Generic;
using System.Management.Automation.Language;
using System.Runtime.Serialization;

namespace DataImport.Common.Preprocessors
{
[Serializable]
public class PowerShellValidateException : Exception
{
public IEnumerable<ParseError> ParseErrors { get; }
Expand All @@ -23,18 +21,5 @@ public PowerShellValidateException(ParseError[] parseErrors)

public PowerShellValidateException(string message)
: base(message) { }

#pragma warning disable S1133 // Deprecated code should be removed
[Obsolete("Obsolete for NET 8", DiagnosticId = "SYSLIB0051")]
protected PowerShellValidateException(SerializationInfo info, StreamingContext context)
: base(info, context) { }

[Obsolete("Obsolete for NET 8", DiagnosticId = "SYSLIB0051")]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue(nameof(ParseErrors), ParseErrors);
}
#pragma warning disable S1133 // Deprecated code should be removed
}
}

0 comments on commit de8491e

Please sign in to comment.