Esempio n. 1
0
        internal void Parse(BoundStateMachineScope boundIteratorScope)
        {
            if (boundIteratorScope == null)
            {
                throw new ArgumentNullException("boundIteratorScope");
            }

            foreach (var synthesizedFieldSymbolBase in boundIteratorScope.Fields)
            {
                this.Fields.Add(synthesizedFieldSymbolBase);
            }

            Statements = Deserialize(boundIteratorScope.Statement);
        }
Esempio n. 2
0
        private void EmitStateMachineScope(BoundStateMachineScope scope)
        {
            _builder.OpenStateMachineScope();
            foreach (var field in scope.Fields)
            {
                _builder.DefineUserDefinedStateMachineHoistedLocal(field.SlotIndex);
            }

            EmitStatement(scope.Statement);
            _builder.CloseStateMachineScope();
        }