System.Xml.Xsl.IlGen.XmlILVisitor.StartLetBinding C# (CSharp) Method

StartLetBinding() public method

Bind values in the "ndLet" expression to a non-stack location that can later be referenced.
public StartLetBinding ( QilIterator ndLet ) : void
ndLet System.Xml.Xsl.Qil.QilIterator
return void
        public void StartLetBinding(QilIterator ndLet) {
            Debug.Assert(!ndLet.XmlType.IsSingleton);

            // Construct nested iterator
            StartNestedIterator(ndLet);

            // Allow base internal class to dispatch based on QilExpression node type
            NestedVisit(ndLet.Binding, GetItemStorageType(ndLet), !ndLet.XmlType.IsSingleton);

            // DebugInfo: Open variable scope
            // DebugInfo: Ensure that for variable is stored in a local and tag it with the user-defined name
            if (this.qil.IsDebug && ndLet.DebugName != null) {
                this.helper.DebugStartScope();

                // Ensure that cache is stored in a local variable with a user-defined name
                this.iterCurr.EnsureLocal("$$$cache");
                this.iterCurr.Storage.LocalLocation.SetLocalSymInfo(ndLet.DebugName);
            }
            else {
                // Ensure that cache is not stored on the stack
                this.iterCurr.EnsureNoStack("$$$cache");
            }

            EndNestedIterator(ndLet);
        }
XmlILVisitor