public PoolConstantBinding(string name, RTB.PoolBinding poolBinding, RTB.PoolConstantBinding binding)
     : base(name, binding)
 {
     if (poolBinding == null)
     {
         throw new ArgumentNullException("poolBinding");
     }
     this.PoolBinding = poolBinding;
 }
Exemple #2
0
        protected override NameBinding ResolveBinding(string name)
        {
            NameBinding result = null;

            RTB.PoolVariableOrConstantBinding binding;
            this.Pool.TryGetValue(name, out binding);
            if (binding != null)
            {
                RTB.PoolBinding poolBinding = this.Pool.Runtime.GlobalScope.GetPoolBinding(this.Pool.Name);
                System.Diagnostics.Debug.Assert(poolBinding != null, String.Format("Could not find pool binding named {0}.", this.Pool.Name.Value));
                if (binding is RTB.PoolConstantBinding)
                {
                    result = new PoolConstantBinding(name, poolBinding, (RTB.PoolConstantBinding)binding);
                }
                else
                {
                    result = new PoolVariableBinding(name, poolBinding, (RTB.PoolVariableBinding)binding);
                }
            }
            return(result); // null means try outer scope.
        }