CannotUnloadAppDomainException.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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.
  4. using System.Runtime.Serialization;
  5. namespace System
  6. {
  7. [Serializable]
  8. [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
  9. #if PROJECTN
  10. [Internal.Runtime.CompilerServices.RelocatedType("System.Runtime.Extensions")]
  11. #endif
  12. public class CannotUnloadAppDomainException : SystemException
  13. {
  14. internal const int COR_E_CANNOTUNLOADAPPDOMAIN = unchecked((int)0x80131015); // corresponds to __HResults.COR_E_CANNOTUNLOADAPPDOMAIN in corelib
  15. public CannotUnloadAppDomainException()
  16. : base(SR.Arg_CannotUnloadAppDomainException)
  17. {
  18. HResult = COR_E_CANNOTUNLOADAPPDOMAIN;
  19. }
  20. public CannotUnloadAppDomainException(string? message)
  21. : base(message)
  22. {
  23. HResult = COR_E_CANNOTUNLOADAPPDOMAIN;
  24. }
  25. public CannotUnloadAppDomainException(string? message, Exception? innerException)
  26. : base(message, innerException)
  27. {
  28. HResult = COR_E_CANNOTUNLOADAPPDOMAIN;
  29. }
  30. protected CannotUnloadAppDomainException(SerializationInfo info, StreamingContext context) : base(info, context)
  31. {
  32. }
  33. }
  34. }