private void CreateSubRoutineForVal(object val) { _subroutine = _yieldInstructionFactory.CreateYieldInstructionWrapper(val); if (_subroutine != null && !_subroutine.HasUpdater) { _subroutine.RegisterUpdater(this); } }
ICFunc AddFunction(ICFunc function) { if (_routines.Contains(function)) { throw new AlreadyAddedCoroutineException(); } function.RegisterUpdater(this); _routines.Add(function); return(function); }