Esempio n. 1
0
        private object[] BindExpr(IDictionary <XmlQualifiedName, object> vars)
        {
            XPath2RunningContext runningContext = new XPath2RunningContext();

            NameBinder.ReferenceLink[] variables = null;
            object[] variableValues = null;
            if (vars != null)
            {
                variables      = new NameBinder.ReferenceLink[vars.Count];
                variableValues = new object[vars.Count];
                var array = new KeyValuePair <XmlQualifiedName, object> [vars.Count];
                vars.CopyTo(array, 0);
                for (int k = 0; k < array.Length; k++)
                {
                    variables[k]      = runningContext.NameBinder.PushVar(array[k].Key);
                    variableValues[k] = array[k].Value;
                }
            }
            context.RunningContext = runningContext;
            ExpressionTree.Bind();
            object[] dataPool = new object[runningContext.NameBinder.Length];
            if (vars != null)
            {
                for (int k = 0; k < variables.Length; k++)
                {
                    variables[k].Set(dataPool, PrepareValue(variableValues[k]));
                }
            }
            return(dataPool);
        }
Esempio n. 2
0
 public NameSlot(NameBinder.ReferenceLink id, XmlQualifiedName name)
 {
     this.id   = id;
     this.name = name;
 }