The Labs \ Source Viewer \ SSCLI \ System.Xml.Xsl.Qil \ QilReference

  1. //------------------------------------------------------------------------------
  2. // <copyright file="QilReference.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. using System;
  16. using System.Diagnostics;
  17. namespace System.Xml.Xsl.Qil
  18. {
  19.    
  20.     /// <summary>
  21.     /// View over a Qil node which is the target of a reference (functions, variables, parameters).
  22.     /// </summary>
  23.     internal class QilReference : QilNode
  24.     {
  25.         private const int MaxDebugNameLength = 1023;
  26.        
  27.         private string debugName;
  28.        
  29.         //-----------------------------------------------
  30.         // Constructor
  31.         //-----------------------------------------------
  32.        
  33.         /// <summary>
  34.         /// Construct a reference
  35.         /// </summary>
  36.         public QilReference(QilNodeType nodeType) : base(nodeType)
  37.         {
  38.         }
  39.        
  40.        
  41.         //-----------------------------------------------
  42.         // QilReference methods
  43.         //-----------------------------------------------
  44.        
  45.         /// <summary>
  46.         /// Name of this reference, preserved for debugging (may be null).
  47.         /// </summary>
  48.         public string DebugName {
  49.             get { return this.debugName; }
  50.             set {
  51.                 if (value.Length > MaxDebugNameLength)
  52.                     value = value.Substring(0, MaxDebugNameLength);
  53.                
  54.                 this.debugName = value;
  55.             }
  56.         }
  57.     }
  58. }

Developer Fusion