예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: There is no .NET equivalent to the Java 'super' constraint:
//ORIGINAL LINE: <R extends org.neo4j.kernel.impl.store.record.AbstractBaseRecord> void apply(RecordStore<R> store, org.neo4j.helpers.progress.ProgressListener progressListener, System.Predicate<? super R>... filters) throws FAILURE
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
        internal virtual void Apply <R>(RecordStore <R> store, ProgressListener progressListener, params System.Predicate <object>[] filters) where R : Org.Neo4j.Kernel.impl.store.record.AbstractBaseRecord
        {
            ResourceIterable <R> iterable = Scanner.Scan(store, true, filters);

            using (ResourceIterator <R> scan = iterable.GetEnumerator())
            {
                while (scan.MoveNext())
                {
                    R record = scan.Current;
                    if (ShouldStop)
                    {
                        break;
                    }

                    store.Accept(this, record);
                    progressListener.Set(record.Id);
                }
                progressListener.Done();
            }
        }