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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="CodeTypeOfExpression.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 a TypeOf expression.
  27.     /// </para>
  28.     /// </devdoc>
  29.     [ClassInterface(ClassInterfaceType.AutoDispatch), ComVisible(true), Serializable()]
  30.     public class CodeTypeOfExpression : CodeExpression
  31.     {
  32.         private CodeTypeReference type;
  33.        
  34.         /// <devdoc>
  35.         /// <para>
  36.         /// Initializes a new instance of <see cref='System.CodeDom.CodeTypeOfExpression'/>.
  37.         /// </para>
  38.         /// </devdoc>
  39.         public CodeTypeOfExpression()
  40.         {
  41.         }
  42.        
  43.         /// <devdoc>
  44.         /// <para>
  45.         /// Initializes a new instance of <see cref='System.CodeDom.CodeTypeOfExpression'/>.
  46.         /// </para>
  47.         /// </devdoc>
  48.         public CodeTypeOfExpression(CodeTypeReference type)
  49.         {
  50.             Type = type;
  51.         }
  52.        
  53.         /// <devdoc>
  54.         /// <para>[To be supplied.]</para>
  55.         /// </devdoc>
  56.         public CodeTypeOfExpression(string type)
  57.         {
  58.             Type = new CodeTypeReference(type);
  59.         }
  60.        
  61.         /// <devdoc>
  62.         /// <para>[To be supplied.]</para>
  63.         /// </devdoc>
  64.         public CodeTypeOfExpression(Type type)
  65.         {
  66.             Type = new CodeTypeReference(type);
  67.         }
  68.        
  69.         /// <devdoc>
  70.         /// <para>
  71.         /// Gets or sets the data type.
  72.         /// </para>
  73.         /// </devdoc>
  74.         public CodeTypeReference Type {
  75.             get {
  76.                 if (type == null) {
  77.                     type = new CodeTypeReference("");
  78.                 }
  79.                 return type;
  80.             }
  81.             set { type = value; }
  82.         }
  83.     }
  84. }

Developer Fusion