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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="CodeFieldReferenceExpression.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 reference to a field.
  27.     /// </para>
  28.     /// </devdoc>
  29.     [ClassInterface(ClassInterfaceType.AutoDispatch), ComVisible(true), Serializable()]
  30.     public class CodeFieldReferenceExpression : CodeExpression
  31.     {
  32.         private CodeExpression targetObject;
  33.         private string fieldName;
  34.        
  35.         /// <devdoc>
  36.         /// <para>
  37.         /// Initializes a new instance of <see cref='System.CodeDom.CodeFieldReferenceExpression'/>.
  38.         /// </para>
  39.         /// </devdoc>
  40.         public CodeFieldReferenceExpression()
  41.         {
  42.         }
  43.        
  44.         /// <devdoc>
  45.         /// <para>
  46.         /// Initializes a new instance of <see cref='System.CodeDom.CodeFieldReferenceExpression'/>.
  47.         /// </para>
  48.         /// </devdoc>
  49.         public CodeFieldReferenceExpression(CodeExpression targetObject, string fieldName)
  50.         {
  51.             TargetObject = targetObject;
  52.             FieldName = fieldName;
  53.         }
  54.        
  55.         /// <devdoc>
  56.         /// <para>
  57.         /// Gets or sets
  58.         /// the target object.
  59.         /// </para>
  60.         /// </devdoc>
  61.         public CodeExpression TargetObject {
  62.             get { return targetObject; }
  63.             set { targetObject = value; }
  64.         }
  65.        
  66.         /// <devdoc>
  67.         /// <para>
  68.         /// Gets or sets
  69.         /// the field name.
  70.         /// </para>
  71.         /// </devdoc>
  72.         public string FieldName {
  73.             get { return (fieldName == null) ? string.Empty : fieldName; }
  74.             set { fieldName = value; }
  75.         }
  76.     }
  77. }

Developer Fusion