diff options
author | Stephen Toub <stoub@microsoft.com> | 2019-08-08 22:12:50 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-08-09 17:23:42 +0300 |
commit | f39ac1d32d357b30253fc713155547f39256fe83 (patch) | |
tree | df7b173aafff1914b24f7b040c17bea4da025dc9 /netcore | |
parent | 2d3a6ea2bbefb7d2f32b3925b3c71d0c725feaf0 (diff) |
Fix FxCop warning CA2229 (private deserialization ctor)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'netcore')
14 files changed, 15 insertions, 13 deletions
diff --git a/netcore/System.Private.CoreLib/shared/System/DataMisalignedException.cs b/netcore/System.Private.CoreLib/shared/System/DataMisalignedException.cs index 2b49e5a9857..927abe0edc7 100644 --- a/netcore/System.Private.CoreLib/shared/System/DataMisalignedException.cs +++ b/netcore/System.Private.CoreLib/shared/System/DataMisalignedException.cs @@ -35,7 +35,7 @@ namespace System HResult = HResults.COR_E_DATAMISALIGNED; } - internal DataMisalignedException(SerializationInfo info, StreamingContext context) : base(info, context) + private DataMisalignedException(SerializationInfo info, StreamingContext context) : base(info, context) { } } diff --git a/netcore/System.Private.CoreLib/shared/System/ExecutionEngineException.cs b/netcore/System.Private.CoreLib/shared/System/ExecutionEngineException.cs index 2d6da9ca2f9..b804599fc1f 100644 --- a/netcore/System.Private.CoreLib/shared/System/ExecutionEngineException.cs +++ b/netcore/System.Private.CoreLib/shared/System/ExecutionEngineException.cs @@ -43,7 +43,7 @@ namespace System HResult = HResults.COR_E_EXECUTIONENGINE; } - internal ExecutionEngineException(SerializationInfo info, StreamingContext context) : base(info, context) + private ExecutionEngineException(SerializationInfo info, StreamingContext context) : base(info, context) { } } diff --git a/netcore/System.Private.CoreLib/shared/System/IndexOutOfRangeException.cs b/netcore/System.Private.CoreLib/shared/System/IndexOutOfRangeException.cs index ec4195c23fb..b2ef53865b7 100644 --- a/netcore/System.Private.CoreLib/shared/System/IndexOutOfRangeException.cs +++ b/netcore/System.Private.CoreLib/shared/System/IndexOutOfRangeException.cs @@ -37,7 +37,7 @@ namespace System HResult = HResults.COR_E_INDEXOUTOFRANGE; } - internal IndexOutOfRangeException(SerializationInfo info, StreamingContext context) : base(info, context) + private IndexOutOfRangeException(SerializationInfo info, StreamingContext context) : base(info, context) { } } diff --git a/netcore/System.Private.CoreLib/shared/System/InsufficientExecutionStackException.cs b/netcore/System.Private.CoreLib/shared/System/InsufficientExecutionStackException.cs index bb60d533f0a..998a824ff69 100644 --- a/netcore/System.Private.CoreLib/shared/System/InsufficientExecutionStackException.cs +++ b/netcore/System.Private.CoreLib/shared/System/InsufficientExecutionStackException.cs @@ -28,7 +28,7 @@ namespace System HResult = HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; } - internal InsufficientExecutionStackException(SerializationInfo info, StreamingContext context) : base(info, context) + private InsufficientExecutionStackException(SerializationInfo info, StreamingContext context) : base(info, context) { } } diff --git a/netcore/System.Private.CoreLib/shared/System/InvalidProgramException.cs b/netcore/System.Private.CoreLib/shared/System/InvalidProgramException.cs index 236768e25ac..d20391beb02 100644 --- a/netcore/System.Private.CoreLib/shared/System/InvalidProgramException.cs +++ b/netcore/System.Private.CoreLib/shared/System/InvalidProgramException.cs @@ -37,6 +37,6 @@ namespace System HResult = HResults.COR_E_INVALIDPROGRAM; } - internal InvalidProgramException(SerializationInfo info, StreamingContext context) : base(info, context) { } + private InvalidProgramException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } diff --git a/netcore/System.Private.CoreLib/shared/System/MulticastNotSupportedException.cs b/netcore/System.Private.CoreLib/shared/System/MulticastNotSupportedException.cs index 898b2ebd0dc..34c7ed5d531 100644 --- a/netcore/System.Private.CoreLib/shared/System/MulticastNotSupportedException.cs +++ b/netcore/System.Private.CoreLib/shared/System/MulticastNotSupportedException.cs @@ -33,7 +33,7 @@ namespace System HResult = HResults.COR_E_MULTICASTNOTSUPPORTED; } - internal MulticastNotSupportedException(SerializationInfo info, StreamingContext context) : base(info, context) + private MulticastNotSupportedException(SerializationInfo info, StreamingContext context) : base(info, context) { } } diff --git a/netcore/System.Private.CoreLib/shared/System/Reflection/AmbiguousMatchException.cs b/netcore/System.Private.CoreLib/shared/System/Reflection/AmbiguousMatchException.cs index 7db74c65564..f6472c9953a 100644 --- a/netcore/System.Private.CoreLib/shared/System/Reflection/AmbiguousMatchException.cs +++ b/netcore/System.Private.CoreLib/shared/System/Reflection/AmbiguousMatchException.cs @@ -28,7 +28,7 @@ namespace System.Reflection HResult = HResults.COR_E_AMBIGUOUSMATCH; } - internal AmbiguousMatchException(SerializationInfo info, StreamingContext context) : base(info, context) + private AmbiguousMatchException(SerializationInfo info, StreamingContext context) : base(info, context) { } } diff --git a/netcore/System.Private.CoreLib/shared/System/Reflection/TargetInvocationException.cs b/netcore/System.Private.CoreLib/shared/System/Reflection/TargetInvocationException.cs index 9d9253202c7..d529e649927 100644 --- a/netcore/System.Private.CoreLib/shared/System/Reflection/TargetInvocationException.cs +++ b/netcore/System.Private.CoreLib/shared/System/Reflection/TargetInvocationException.cs @@ -22,7 +22,7 @@ namespace System.Reflection HResult = HResults.COR_E_TARGETINVOCATION; } - internal TargetInvocationException(SerializationInfo info, StreamingContext context) + private TargetInvocationException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/netcore/System.Private.CoreLib/shared/System/Reflection/TargetParameterCountException.cs b/netcore/System.Private.CoreLib/shared/System/Reflection/TargetParameterCountException.cs index aaf1c33476d..888068da7c9 100644 --- a/netcore/System.Private.CoreLib/shared/System/Reflection/TargetParameterCountException.cs +++ b/netcore/System.Private.CoreLib/shared/System/Reflection/TargetParameterCountException.cs @@ -28,7 +28,7 @@ namespace System.Reflection HResult = HResults.COR_E_TARGETPARAMCOUNT; } - internal TargetParameterCountException(SerializationInfo info, StreamingContext context) + private TargetParameterCountException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/netcore/System.Private.CoreLib/shared/System/StackOverflowException.cs b/netcore/System.Private.CoreLib/shared/System/StackOverflowException.cs index 0177b588170..a1dd460ab58 100644 --- a/netcore/System.Private.CoreLib/shared/System/StackOverflowException.cs +++ b/netcore/System.Private.CoreLib/shared/System/StackOverflowException.cs @@ -37,7 +37,7 @@ namespace System HResult = HResults.COR_E_STACKOVERFLOW; } - internal StackOverflowException(SerializationInfo info, StreamingContext context) : base(info, context) + private StackOverflowException(SerializationInfo info, StreamingContext context) : base(info, context) { } } diff --git a/netcore/System.Private.CoreLib/shared/System/Threading/ThreadAbortException.cs b/netcore/System.Private.CoreLib/shared/System/Threading/ThreadAbortException.cs index 9391bb4e0a4..574e27f4177 100644 --- a/netcore/System.Private.CoreLib/shared/System/Threading/ThreadAbortException.cs +++ b/netcore/System.Private.CoreLib/shared/System/Threading/ThreadAbortException.cs @@ -29,7 +29,7 @@ namespace System.Threading public object? ExceptionState => null; - internal ThreadAbortException(SerializationInfo info, StreamingContext context) + private ThreadAbortException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/netcore/System.Private.CoreLib/shared/System/TypeInitializationException.cs b/netcore/System.Private.CoreLib/shared/System/TypeInitializationException.cs index 45867464f97..a0f5d086631 100644 --- a/netcore/System.Private.CoreLib/shared/System/TypeInitializationException.cs +++ b/netcore/System.Private.CoreLib/shared/System/TypeInitializationException.cs @@ -53,7 +53,7 @@ namespace System HResult = HResults.COR_E_TYPEINITIALIZATION; } - internal TypeInitializationException(SerializationInfo info, StreamingContext context) + private TypeInitializationException(SerializationInfo info, StreamingContext context) : base(info, context) { _typeName = info.GetString("TypeName"); diff --git a/netcore/System.Private.CoreLib/shared/System/UnitySerializationHolder.cs b/netcore/System.Private.CoreLib/shared/System/UnitySerializationHolder.cs index b369a7ac075..ac90cf152ab 100644 --- a/netcore/System.Private.CoreLib/shared/System/UnitySerializationHolder.cs +++ b/netcore/System.Private.CoreLib/shared/System/UnitySerializationHolder.cs @@ -31,7 +31,9 @@ namespace System info.AddValue("AssemblyName", string.Empty); } +#pragma warning disable CA2229 // public for compat public UnitySerializationHolder(SerializationInfo info, StreamingContext context) +#pragma warning restore CA2229 { if (info == null) { diff --git a/netcore/System.Private.CoreLib/shared/System/WeakReference.T.cs b/netcore/System.Private.CoreLib/shared/System/WeakReference.T.cs index 81c9eccb414..73aac7f1dc3 100644 --- a/netcore/System.Private.CoreLib/shared/System/WeakReference.T.cs +++ b/netcore/System.Private.CoreLib/shared/System/WeakReference.T.cs @@ -31,7 +31,7 @@ namespace System Create(target, trackResurrection); } - internal WeakReference(SerializationInfo info, StreamingContext context) + private WeakReference(SerializationInfo info, StreamingContext context) { if (info == null) { |