MissingSatelliteAssemblyException.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. /*============================================================
  5. **
  6. **
  7. **
  8. **
  9. **
  10. ** Purpose: Exception for a missing satellite assembly needed
  11. ** for ultimate resource fallback. This usually
  12. ** indicates a setup and/or deployment problem.
  13. **
  14. **
  15. ===========================================================*/
  16. using System;
  17. using System.Runtime.Serialization;
  18. namespace System.Resources
  19. {
  20. [Serializable]
  21. [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
  22. public class MissingSatelliteAssemblyException : SystemException
  23. {
  24. private string _cultureName;
  25. public MissingSatelliteAssemblyException()
  26. : base(SR.MissingSatelliteAssembly_Default)
  27. {
  28. HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY;
  29. }
  30. public MissingSatelliteAssemblyException(string message)
  31. : base(message)
  32. {
  33. HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY;
  34. }
  35. public MissingSatelliteAssemblyException(string message, string cultureName)
  36. : base(message)
  37. {
  38. HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY;
  39. _cultureName = cultureName;
  40. }
  41. public MissingSatelliteAssemblyException(string message, Exception inner)
  42. : base(message, inner)
  43. {
  44. HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY;
  45. }
  46. protected MissingSatelliteAssemblyException(SerializationInfo info, StreamingContext context)
  47. : base(info, context)
  48. {
  49. }
  50. public string CultureName
  51. {
  52. get { return _cultureName; }
  53. }
  54. }
  55. }