コード例 #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);
        }
コード例 #2
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);
        }
コード例 #3
0
 public ExtensionMethodScopeEnumerator(Binder binder)
 {
     this.binder = binder;
     this.current = new ExtensionMethodScope();
 }
コード例 #4
0
 public ExtensionMethodScopeEnumerator(Binder binder)
 {
     this.binder  = binder;
     this.current = new ExtensionMethodScope();
 }