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

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

            return(this.current.Binder != null);
        }
Beispiel #3
0
 public ExtensionMethodScopeEnumerator(Binder binder)
 {
     this.binder = binder;
     this.current = new ExtensionMethodScope();
 }
 public ExtensionMethodScopeEnumerator(Binder binder)
 {
     this.binder  = binder;
     this.current = new ExtensionMethodScope();
 }