1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
5 /*=============================================================================
9 ** Purpose: Exception class for duplicate objects in WaitAll/WaitAny.
12 =============================================================================*/
14 using System
.Runtime
.Serialization
;
18 // The DuplicateWaitObjectException is thrown when an object
19 // appears more than once in the list of objects to WaitAll or WaitAny.
21 [System
.Runtime
.CompilerServices
.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
22 public class DuplicateWaitObjectException
: ArgumentException
24 // Creates a new DuplicateWaitObjectException with its message
25 // string set to a default message.
26 public DuplicateWaitObjectException()
27 : base(SR
.Arg_DuplicateWaitObjectException
)
29 HResult
= HResults
.COR_E_DUPLICATEWAITOBJECT
;
32 public DuplicateWaitObjectException(string? parameterName
)
33 : base(SR
.Arg_DuplicateWaitObjectException
, parameterName
)
35 HResult
= HResults
.COR_E_DUPLICATEWAITOBJECT
;
38 public DuplicateWaitObjectException(string? parameterName
, string? message
)
39 : base(message
, parameterName
)
41 HResult
= HResults
.COR_E_DUPLICATEWAITOBJECT
;
44 public DuplicateWaitObjectException(string? message
, Exception
? innerException
)
45 : base(message
, innerException
)
47 HResult
= HResults
.COR_E_DUPLICATEWAITOBJECT
;
50 protected DuplicateWaitObjectException(SerializationInfo info
, StreamingContext context
) : base(info
, context
)