Example #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void foreach(org.neo4j.function.ThrowingBiConsumer<String,org.neo4j.values.AnyValue,E> f) throws E
            public override void Foreach <E>(ThrowingBiConsumer <string, AnyValue, E> f) where E : Exception
            {
                foreach (KeyValuePair <string, AnyValue> entry in Map.SetOfKeyValuePairs())
                {
                    f.Accept(entry.Key, entry.Value);
                }
            }
Example #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void foreach(org.neo4j.function.ThrowingBiConsumer<String,org.neo4j.values.AnyValue,E> f) throws E
            public override void Foreach <E>(ThrowingBiConsumer <string, AnyValue, E> f) where E : Exception
            {
                Map.@foreach(f);
                for (int i = 0; i < UpdatedKeys.Length; i++)
                {
                    f.Accept(UpdatedKeys[i], UpdatedValues[i]);
                }
            }
Example #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void foreach(org.neo4j.function.ThrowingBiConsumer<String,org.neo4j.values.AnyValue,E> f) throws E
            public override void Foreach <E>(ThrowingBiConsumer <string, AnyValue, E> f) where E : Exception
            {
                Map.@foreach((s, anyValue) =>
                {
                    if (Filter.apply(s, anyValue))
                    {
                        f.Accept(s, anyValue);
                    }
                });
            }
Example #4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void foreach(org.neo4j.function.ThrowingBiConsumer<String,org.neo4j.values.AnyValue,E> f) throws E
            public override void Foreach <E>(ThrowingBiConsumer <string, AnyValue, E> f) where E : Exception
            {
                HashSet <string> seen = new HashSet <string>();
                ThrowingBiConsumer <string, AnyValue, E> consume = (key, value) =>
                {
                    if (seen.Add(key))
                    {
                        f.Accept(key, value);
                    }
                };

                for (int i = Maps.Length - 1; i >= 0; i--)
                {
                    Maps[i].@foreach(consume);
                }
            }
Example #5
0
            public override int Size()
            {
                int[]            size = new int[] { 0 };
                HashSet <string> seen = new HashSet <string>();
                ThrowingBiConsumer <string, AnyValue, Exception> consume = (key, value) =>
                {
                    if (seen.Add(key))
                    {
                        size[0]++;
                    }
                };

                for (int i = Maps.Length - 1; i >= 0; i--)
                {
                    Maps[i].@foreach(consume);
                }
                return(size[0]);
            }
Example #6
0
 internal CommandBatcher(int maxBatchSize, ThrowingBiConsumer <long, IList <DistributedOperation>, Exception> applier)
 {
     this._batch        = new List <DistributedOperation>(maxBatchSize);
     this._maxBatchSize = maxBatchSize;
     this._applier      = applier;
 }
Example #7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public abstract <E extends Exception> void foreach(org.neo4j.function.ThrowingBiConsumer<String,org.neo4j.values.AnyValue,E> f) throws E;
        public abstract void @foreach <E>(ThrowingBiConsumer <string, AnyValue, E> f) where E : Exception;
Example #8
0
 public override void @foreach <E>(ThrowingBiConsumer <string, AnyValue, E> f) where E : Exception
 {
     //do nothing
 }
Example #9
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void foreach(org.neo4j.function.ThrowingBiConsumer<String,org.neo4j.values.AnyValue,E> f) throws E
            public override void Foreach <E>(ThrowingBiConsumer <string, AnyValue, E> f) where E : Exception
            {
                Map.@foreach((s, anyValue) => f.accept(s, MapFunction.apply(s, anyValue)));
            }