PageRenderTime 26ms CodeModel.GetById 18ms app.highlight 5ms RepoModel.GetById 1ms 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
 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
16using System;
17using System.Collections.Generic;
18using System.ComponentModel;
19using System.Runtime.Serialization;
20using Microsoft.Scripting.Runtime;
21
22namespace IronPython.Runtime.Exceptions {
23    #region Generated DeprecationWarningException
24
25    // *** BEGIN GENERATED CODE ***
26    // generated by function: gen_one_exception_specialized from: generate_exceptions.py
27
28
29    [Serializable]
30    public class DeprecationWarningException : WarningException, IPythonAwareException {
31        private object _pyExceptionObject;
32        private List<DynamicStackFrame> _frames;
33        private TraceBack _traceback;
34
35        public DeprecationWarningException() : base() { }
36        public DeprecationWarningException(string msg) : base(msg) { }
37        public DeprecationWarningException(string message, Exception innerException)
38            : base(message, innerException) {
39        }
40#if !SILVERLIGHT // SerializationInfo
41        protected DeprecationWarningException(SerializationInfo info, StreamingContext context) : base(info, context) { }
42
43        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
44        public override void GetObjectData(SerializationInfo info, StreamingContext context) {
45            info.AddValue("frames", _frames);
46            info.AddValue("traceback", _traceback);
47            base.GetObjectData(info, context);
48        }
49#endif
50
51        object IPythonAwareException.PythonException {
52            get { 
53                if (_pyExceptionObject == null) {
54                    var newEx = new PythonExceptions.BaseException(PythonExceptions.DeprecationWarning);
55                    newEx.InitializeFromClr(this);
56                    _pyExceptionObject = newEx;
57                }
58                return _pyExceptionObject; 
59            }
60            set { _pyExceptionObject = value; }
61        }
62
63        List<DynamicStackFrame> IPythonAwareException.Frames {
64            get { return _frames; }
65            set { _frames = value; }
66        }
67
68        TraceBack IPythonAwareException.TraceBack {
69            get { return _traceback; }
70            set { _traceback = value; }
71        }
72    }
73
74
75    // *** END GENERATED CODE ***
76
77    #endregion
78
79    // *** END GENERATED CODE ***
80}