Skip to content

Commit

Permalink
fixed: dadhi#95 Serializable ContainerException for supported targets
Browse files Browse the repository at this point in the history
  • Loading branch information
dadhi authored and Leszek-Kowalski committed Oct 11, 2019
1 parent 823a487 commit 9ba6a2b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/DryIoc/Container.cs
Expand Up @@ -10219,10 +10219,12 @@ public Meta(T value, TMetadata metadata)
}
}

/// <summary>Exception that container throws in case of error. Dedicated exception type simplifies
/// filtering or catching container relevant exceptions from client code.</summary>
[SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable",
Justification = "Not available in PCL.")]
/// Exception that container throws in case of error. Dedicated exception type simplifies
/// filtering or catching container relevant exceptions from client code.
#if !NETSTANDARD1_0 && !NETSTANDARD1_3 && !PCL
[Serializable]
#endif
[SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable", Justification = "Not available in PCL.")]
public class ContainerException : InvalidOperationException
{
/// <summary>Error code of exception, possible values are listed in <see cref="Error"/> class.</summary>
Expand Down Expand Up @@ -10258,6 +10260,11 @@ public ContainerException(int errorCode, string message, Exception innerExceptio
/// <summary>Creates exception with message describing cause and context of error.</summary>
public ContainerException(int error, string message)
: this(error, message, null) { }

#if !NETSTANDARD1_0 && !NETSTANDARD1_3 && !PCL
protected ContainerException(SerializationInfo info, StreamingContext context)
: base(info, context) {}
#endif
}

/// <summary>Defines error codes and error messages for all DryIoc exceptions (DryIoc extensions may define their own.)</summary>
Expand Down

0 comments on commit 9ba6a2b

Please sign in to comment.