The Labs \ Source Viewer \ SSCLI \ System.CodeDom \ CodeThrowExceptionStatement

  1. //------------------------------------------------------------------------------
  2. // <copyright file="CodeThrowExceptionStatement.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.CodeDom
  16. {
  17.    
  18.     using System.Diagnostics;
  19.     using System;
  20.     using Microsoft.Win32;
  21.     using System.Collections;
  22.     using System.Runtime.InteropServices;
  23.    
  24.     /// <devdoc>
  25.     /// <para>
  26.     /// Represents
  27.     /// a statement that throws an exception.
  28.     /// </para>
  29.     /// </devdoc>
  30.     [ClassInterface(ClassInterfaceType.AutoDispatch), ComVisible(true), Serializable()]
  31.     public class CodeThrowExceptionStatement : CodeStatement
  32.     {
  33.         private CodeExpression toThrow;
  34.        
  35.         /// <devdoc>
  36.         /// <para>
  37.         /// Initializes a new instance of <see cref='System.CodeDom.CodeThrowExceptionStatement'/>.
  38.         /// </para>
  39.         /// </devdoc>
  40.         public CodeThrowExceptionStatement()
  41.         {
  42.         }
  43.        
  44.         /// <devdoc>
  45.         /// <para>
  46.         /// Initializes a new instance of <see cref='System.CodeDom.CodeThrowExceptionStatement'/> using the specified statement.
  47.         /// </para>
  48.         /// </devdoc>
  49.         public CodeThrowExceptionStatement(CodeExpression toThrow)
  50.         {
  51.             ToThrow = toThrow;
  52.         }
  53.        
  54.         /// <devdoc>
  55.         /// <para>
  56.         /// Gets or sets
  57.         /// the expression to throw.
  58.         /// </para>
  59.         /// </devdoc>
  60.         public CodeExpression ToThrow {
  61.             get { return toThrow; }
  62.             set { toThrow = value; }
  63.         }
  64.     }
  65. }

Developer Fusion