PageRenderTime 49ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/IronPython_Main/Languages/IronPython/IronPython/Runtime/Exceptions/DeprecationWarningException.Generated.cs

#
C# | 80 lines | 48 code | 14 blank | 18 comment | 2 complexity | c2be89b9e8f5f8b4995d04726d80d71a MD5 | raw file
Possible License(s): GPL-2.0, MPL-2.0-no-copyleft-exception, CPL-1.0, CC-BY-SA-3.0, BSD-3-Clause, ISC, AGPL-3.0, LGPL-2.1, Apache-2.0
  1. /* ****************************************************************************
  2. *
  3. * Copyright (c) Microsoft Corporation.
  4. *
  5. * This source code is subject to terms and conditions of the Apache License, Version 2.0. A
  6. * copy of the license can be found in the License.html file at the root of this distribution. If
  7. * you cannot locate the Apache License, Version 2.0, please send an email to
  8. * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
  9. * by the terms of the Apache License, Version 2.0.
  10. *
  11. * You must not remove this notice, or any other, from this software.
  12. *
  13. *
  14. * ***************************************************************************/
  15. using System;
  16. using System.Collections.Generic;
  17. using System.ComponentModel;
  18. using System.Runtime.Serialization;
  19. using Microsoft.Scripting.Runtime;
  20. namespace IronPython.Runtime.Exceptions {
  21. #region Generated DeprecationWarningException
  22. // *** BEGIN GENERATED CODE ***
  23. // generated by function: gen_one_exception_specialized from: generate_exceptions.py
  24. [Serializable]
  25. public class DeprecationWarningException : WarningException, IPythonAwareException {
  26. private object _pyExceptionObject;
  27. private List<DynamicStackFrame> _frames;
  28. private TraceBack _traceback;
  29. public DeprecationWarningException() : base() { }
  30. public DeprecationWarningException(string msg) : base(msg) { }
  31. public DeprecationWarningException(string message, Exception innerException)
  32. : base(message, innerException) {
  33. }
  34. #if !SILVERLIGHT // SerializationInfo
  35. protected DeprecationWarningException(SerializationInfo info, StreamingContext context) : base(info, context) { }
  36. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
  37. public override void GetObjectData(SerializationInfo info, StreamingContext context) {
  38. info.AddValue("frames", _frames);
  39. info.AddValue("traceback", _traceback);
  40. base.GetObjectData(info, context);
  41. }
  42. #endif
  43. object IPythonAwareException.PythonException {
  44. get {
  45. if (_pyExceptionObject == null) {
  46. var newEx = new PythonExceptions.BaseException(PythonExceptions.DeprecationWarning);
  47. newEx.InitializeFromClr(this);
  48. _pyExceptionObject = newEx;
  49. }
  50. return _pyExceptionObject;
  51. }
  52. set { _pyExceptionObject = value; }
  53. }
  54. List<DynamicStackFrame> IPythonAwareException.Frames {
  55. get { return _frames; }
  56. set { _frames = value; }
  57. }
  58. TraceBack IPythonAwareException.TraceBack {
  59. get { return _traceback; }
  60. set { _traceback = value; }
  61. }
  62. }
  63. // *** END GENERATED CODE ***
  64. #endregion
  65. // *** END GENERATED CODE ***
  66. }