PageRenderTime 16ms CodeModel.GetById 2ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

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

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