Ejemplo n.º 1
0
        public void Foreach(Type type, out CodeExpression item, CodeExpression array)
        {
            CodeForeach cfe = new CodeForeach(array, type);

            item = cfe.ItemExpression;
            currentBlock.Add(cfe);
            PushNewBlock();
        }
Ejemplo n.º 2
0
        public void EndForeach()
        {
            CodeBlock   block = PopBlock();
            CodeForeach cif   = currentBlock.GetLastItem() as CodeForeach;

            if (cif == null || cif.ForBlock != null)
            {
                throw new InvalidOperationException("'EndForeach' not allowed here");
            }

            cif.ForBlock = block;
        }
Ejemplo n.º 3
0
		public void Foreach (Type type, out CodeExpression item, CodeExpression array)
		{
			CodeForeach cfe = new CodeForeach (array, type);
			item = cfe.ItemExpression;
			currentBlock.Add (cfe);
			PushNewBlock ();
		}