Ejemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: void addToArchive(org.apache.commons.compress.archivers.ArchiveOutputStream stream) throws java.io.IOException
            internal virtual void AddToArchive(ArchiveOutputStream stream)
            {
                ArchiveEntry entry = CreateEntry(File, Root, stream);

                stream.putArchiveEntry(entry);
                Operation.accept(stream);
                stream.closeArchiveEntry();
            }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public io.netty.buffer.ByteBuf readChunk(io.netty.buffer.ByteBufAllocator allocator) throws Exception
            public override ByteBuf ReadChunk(ByteBufAllocator allocator)
            {
                if (IsEndOfInput)
                {
                    return(null);
                }
                ByteBuf buffer = allocator.buffer();

                Marshaller.accept(new BoundedNetworkWritableChannel(buffer));
                IsEndOfInput = true;
                Offset       = buffer.readableBytes();
                return(buffer);
            }
Ejemplo n.º 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: void write(org.neo4j.storageengine.api.WritableChannel channel) throws java.io.IOException
            internal virtual void Write(WritableChannel channel)
            {
                NextJob.accept(channel);
//JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
                if (Commands.hasNext())
                {
//JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
                    StorageCommand storageCommand = Commands.next();
                    NextJob = c => (new StorageCommandSerializer(c)).visit(storageCommand);
                }
                else
                {
                    NextJob = null;
                }
            }
Ejemplo n.º 4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private boolean performAction(long rel, boolean first) throws org.neo4j.internal.kernel.api.exceptions.KernelException
        private bool PerformAction(long rel, bool first)
        {
            if (first)
            {
                if (rel != _firstRelId)
                {
                    // if the first relationship is not the same someone added some new rels, so we need to
                    // lock them all again
                    UnlockAllNodes(_sortedNodeIds);
                    _sortedNodeIds = null;
                    return(true);
                }
            }

            _relIdAction.accept(rel);
            return(false);
        }
Ejemplo n.º 5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void start() throws Throwable
        public override void Start()
        {
            ProcedureJarLoader loader = new ProcedureJarLoader(_compiler, _log);

            ProcedureJarLoader.Callables callables = loader.LoadProceduresFromDir(_pluginDir);
            foreach (CallableProcedure procedure in callables.Procedures())
            {
                Register(procedure);
            }

            foreach (CallableUserFunction function in callables.Functions())
            {
                Register(function);
            }

            foreach (CallableUserAggregationFunction function in callables.AggregationFunctions())
            {
                Register(function);
            }

            // And register built-in procedures
            _builtin.accept(this);
        }
Ejemplo n.º 6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public java.nio.file.FileVisitResult visitFile(java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attrs) throws java.io.IOException
            public override FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
            {
                _operation.accept(file);
                return(base.visitFile(file, attrs));
            }
Ejemplo n.º 7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public java.nio.file.FileVisitResult preVisitDirectory(java.nio.file.Path dir, java.nio.file.attribute.BasicFileAttributes attrs) throws java.io.IOException
            public override FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs)
            {
                _operation.accept(dir);
                return(base.preVisitDirectory(dir, attrs));
            }
Ejemplo n.º 8
0
        private void DoOperation(ThrowingConsumer <Suspendable, Exception> operation, string description)
        {
//JAVA TO C# CONVERTER TODO TASK: Method reference constructor syntax is not converted by Java to C# Converter:
            ErrorHandler.RunAll(description, _suspendables.Select((System.Func <Suspendable, ErrorHandler.ThrowingRunnable>)suspendable => () => operation.accept(suspendable)).ToArray(ErrorHandler.ThrowingRunnable[] ::new));
        }