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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="QilInvokeEarlyBound.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. using System.Reflection;
  18. namespace System.Xml.Xsl.Qil
  19. {
  20.    
  21.     /// <summary>
  22.     /// A function invocation node which reperesents a call to an early bound Clr function.
  23.     /// </summary>
  24.     internal class QilInvokeEarlyBound : QilTernary
  25.     {
  26.        
  27.         //-----------------------------------------------
  28.         // Constructor
  29.         //-----------------------------------------------
  30.        
  31.         /// <summary>
  32.         /// Construct a new node
  33.         /// </summary>
  34.         /// <param name="method">QilLiteral containing the Clr MethodInfo for the early bound function</param>
  35.         public QilInvokeEarlyBound(QilNodeType nodeType, QilNode name, QilNode method, QilNode arguments, XmlQueryType resultType) : base(nodeType, name, method, arguments)
  36.         {
  37.             this.xmlType = resultType;
  38.         }
  39.        
  40.        
  41.         //-----------------------------------------------
  42.         // QilInvokeEarlyBound methods
  43.         //-----------------------------------------------
  44.        
  45.         public QilName Name {
  46.             get { return (QilName)Left; }
  47.             set { Left = value; }
  48.         }
  49.        
  50.         public MethodInfo ClrMethod {
  51.             get { return (MethodInfo)((QilLiteral)Center).Value; }
  52.             set { ((QilLiteral)Center).Value = value; }
  53.         }
  54.        
  55.         public QilList Arguments {
  56.             get { return (QilList)Right; }
  57.             set { Right = value; }
  58.         }
  59.     }
  60. }

Developer Fusion