示例#1
0
        public ITES4CodeFilterable[] Filter(Func <ITES4CodeFilterable, bool> predicate)
        {
            IEnumerable <ITES4CodeFilterable> filtered = new ITES4CodeFilterable[] { };

            if (predicate(this.Reference))
            {
                filtered = filtered.Concat(new ITES4CodeFilterable[] { this.Reference });
            }
            filtered = filtered.Concat(this.Value.Filter(predicate));
            return(filtered.ToArray());
        }
        public ITES4CodeFilterable[] Filter(Func <ITES4CodeFilterable, bool> predicate)
        {
            IEnumerable <ITES4CodeFilterable> filtered = new ITES4CodeFilterable[] { };

            if (this.CodeChunks != null)
            {
                foreach (var codeChunk in this.CodeChunks)
                {
                    filtered = filtered.Concat(codeChunk.Filter(predicate));
                }
            }
            return(filtered.ToArray());
        }
示例#3
0
        public ITES4CodeFilterable[] Filter(Func <ITES4CodeFilterable, bool> predicate)
        {
            IEnumerable <ITES4CodeFilterable> filtered = new ITES4CodeFilterable[] { };

            if (this.VariableDeclarationList != null)
            {
                filtered = filtered.Concat(this.VariableDeclarationList.Filter(predicate));
            }
            if (this.BlockList != null)
            {
                filtered = filtered.Concat(this.BlockList.Filter(predicate));
            }
            return(filtered.ToArray());
        }
        public ITES4CodeFilterable[] Filter(Func <ITES4CodeFilterable, bool> predicate)
        {
            IEnumerable <ITES4CodeFilterable> filtered = new ITES4CodeFilterable[] { };

            if (this.BlockParameterList != null)
            {
                filtered = filtered.Concat(this.BlockParameterList.Filter(predicate));
            }

            if (this.Chunks != null)
            {
                filtered = filtered.Concat(this.Chunks.Filter(predicate));
            }

            return(filtered.ToArray());
        }