Exemple #1
0
        public bool MoveNext()
        {
            if (_current.Binder == null)
            {
                _current = GetNextScope(_binder);
            }
            else
            {
                var binder = _current.Binder;
                // Return a scope for the next Binder that supports extension methods.
                _current = GetNextScope(binder.Next);
            }

            return(_current.Binder != null);
        }
Exemple #2
0
        public bool MoveNext()
        {
            if (_current.Binder == null)
            {
                _current = GetNextScope(_binder);
            }
            else
            {
                var binder = _current.Binder;
                if (!_current.SearchUsingsNotNamespace)
                {
                    // Return a scope for the same Binder that was previously exposed
                    // for the namespace, this time exposed for the usings.
                    _current = new ExtensionMethodScope(binder, searchUsingsNotNamespace: true);
                }
                else
                {
                    // Return a scope for the next Binder that supports extension methods.
                    _current = GetNextScope(binder.Next);
                }
            }

            return(_current.Binder != null);
        }
        public bool MoveNext()
        {
            if (_current.Binder == null)
            {
                _current = GetNextScope(_binder);
            }
            else
            {
                var binder = _current.Binder;
                if (!_current.SearchUsingsNotNamespace)
                {
                    // Return a scope for the same Binder that was previously exposed
                    // for the namespace, this time exposed for the usings.
                    _current = new ExtensionMethodScope(binder, searchUsingsNotNamespace: true);
                }
                else
                {
                    // Return a scope for the next Binder that supports extension methods.
                    _current = GetNextScope(binder.Next);
                }
            }

            return (_current.Binder != null);
        }
Exemple #4
0
 public ExtensionMethodScopeEnumerator(Binder binder)
 {
     _binder  = binder;
     _current = new ExtensionMethodScope();
 }
 public ExtensionMethodScopeEnumerator(Binder binder)
 {
     _binder = binder;
     _current = new ExtensionMethodScope();
 }
Exemple #6
0
 public ExtensionMethodScopeEnumerator(Binder binder)
 {
     this.binder  = binder;
     this.current = new ExtensionMethodScope();
 }