Exemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private byte[] createMsg(byte signature) throws java.io.IOException
        private sbyte[] CreateMsg(sbyte signature)
        {
            PackedOutputArray @out = new PackedOutputArray();

            Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer = Neo4jPack.newPacker(@out);

            packer.PackStructHeader(0, signature);

            return(@out.Bytes());
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private byte[] createMsgWithDuplicateKey(byte signature) throws java.io.IOException
        private sbyte[] CreateMsgWithDuplicateKey(sbyte signature)
        {
            PackedOutputArray @out = new PackedOutputArray();

            Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer = Neo4jPack.newPacker(@out);

            packer.PackStructHeader(2, signature);
            packer.Pack("Text");
            PackMapWithDuplicateKey(packer);

            return(@out.Bytes());
        }
Exemplo n.º 3
0
        public BoltProtocolV1(BoltChannel channel, BoltConnectionFactory connectionFactory, BoltStateMachineFactory stateMachineFactory, LogService logging)
        {
            this._channel = channel;
            this._logging = logging;

            BoltStateMachine stateMachine = stateMachineFactory.NewStateMachine(Version(), channel);

            this._connection = connectionFactory.NewConnection(channel, stateMachine);

            this._neo4jPack     = CreatePack();
            this._messageReader = CreateMessageReader(channel, _neo4jPack, _connection, logging);
        }
Exemplo n.º 4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private byte[] createMsgWithUnknownValue(byte signature) throws java.io.IOException
        private sbyte[] CreateMsgWithUnknownValue(sbyte signature)
        {
            PackedOutputArray @out = new PackedOutputArray();

            Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer = Neo4jPack.newPacker(@out);

            packer.PackStructHeader(2, signature);
            packer.Pack("Text");
            packer.PackMapHeader(1);
            packer.Pack("key1");
            packer.PackStructHeader(0, ( sbyte )'A');

            return(@out.Bytes());
        }
Exemplo n.º 5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private byte[] createRunWithV1Value(org.neo4j.values.AnyValue value) throws java.io.IOException
        private sbyte[] CreateRunWithV1Value(AnyValue value)
        {
            PackedOutputArray @out = new PackedOutputArray();

            Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer = Neo4jPack.newPacker(@out);

            packer.PackStructHeader(2, RunMessage.SIGNATURE);
            packer.Pack("RETURN $x");
            packer.PackMapHeader(1);
            packer.Pack("x");
            packer.Pack(value);

            return(@out.Bytes());
        }
Exemplo n.º 6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static byte[] encode(org.neo4j.bolt.messaging.Neo4jPack neo4jPack, org.neo4j.bolt.messaging.RequestMessage... messages) throws java.io.IOException
        public static sbyte[] Encode(Neo4jPack neo4jPack, params RequestMessage[] messages)
        {
            RecordingByteChannel rawData = new RecordingByteChannel();

            Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer = neo4jPack.NewPacker(new BufferedChannelOutput(rawData));
            BoltRequestMessageWriter writer = RequestMessageWriter(packer);

            foreach (RequestMessage message in messages)
            {
                writer.Write(message);
            }
            writer.Flush();

            return(rawData.Bytes);
        }
Exemplo n.º 7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public byte[] encode(org.neo4j.bolt.messaging.Neo4jPack neo4jPack, org.neo4j.bolt.messaging.ResponseMessage... messages) throws java.io.IOException
            public sbyte[] encode(Neo4jPack neo4jPack, params ResponseMessage[] messages)
            {
                return(serialize(neo4jPack, messages));
            }
Exemplo n.º 8
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public byte[] encode(org.neo4j.bolt.messaging.Neo4jPack neo4jPack, org.neo4j.bolt.messaging.RequestMessage... messages) throws java.io.IOException
            public sbyte[] encode(Neo4jPack neo4jPack, params RequestMessage[] messages)
            {
                return(BoltProtocolV3ComponentFactory.Encode(neo4jPack, messages));
            }
Exemplo n.º 9
0
        protected internal override BoltRequestMessageReader CreateMessageReader(BoltChannel channel, Neo4jPack neo4jPack, BoltConnection connection, LogService logging)
        {
            BoltResponseMessageWriterV1 responseWriter = new BoltResponseMessageWriterV1(neo4jPack, connection.Output(), logging);

            return(new BoltRequestMessageReaderV3(connection, responseWriter, logging));
        }