public BoltResponseMessageWriterV1(PackProvider packerProvider, PackOutput output, LogService logService)
 {
     this._output   = output;
     this._packer   = packerProvider.NewPacker(output);
     this._log      = logService.GetInternalLog(this.GetType());
     this._encoders = RegisterEncoders();
 }
Example #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void encode(org.neo4j.bolt.messaging.Neo4jPack_Packer packer, org.neo4j.bolt.v1.messaging.response.FailureMessage message) throws java.io.IOException
        public override void Encode(Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer, FailureMessage message)
        {
            if (message is FatalFailureMessage)
            {
                _log.debug("Encoding a fatal failure message to send. Message: %s", message);
            }
            EncodeFailure(message, packer);
        }
Example #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void encode(org.neo4j.bolt.messaging.Neo4jPack_Packer packer, org.neo4j.bolt.v1.messaging.response.RecordMessage message) throws java.io.IOException
        public override void Encode(Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer, RecordMessage message)
        {
            AnyValue[] fields = message.Fields();
            packer.PackStructHeader(1, message.Signature());
            packer.PackListHeader(fields.Length);
            foreach (AnyValue field in fields)
            {
                packer.Pack(field);
            }
        }
Example #4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void encodeFailure(org.neo4j.bolt.v1.messaging.response.FailureMessage message, org.neo4j.bolt.messaging.Neo4jPack_Packer packer) throws java.io.IOException
        private void EncodeFailure(FailureMessage message, Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer)
        {
            packer.PackStructHeader(1, message.Signature());
            packer.PackMapHeader(2);

            packer.Pack("code");
            packer.Pack(message.Status().code().serialize());

            packer.Pack("message");
            packer.Pack(message.Message());
        }
Example #5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void encode(org.neo4j.bolt.messaging.Neo4jPack_Packer packer, org.neo4j.bolt.v1.messaging.response.SuccessMessage message) throws java.io.IOException
        public override void Encode(Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer, SuccessMessage message)
        {
            packer.PackStructHeader(1, message.Signature());
            packer.pack(message.Meta());
        }
Example #6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void encode(org.neo4j.bolt.messaging.Neo4jPack_Packer packer, org.neo4j.bolt.v1.messaging.response.IgnoredMessage message) throws java.io.IOException
        public override void Encode(Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer, IgnoredMessage message)
        {
            packer.PackStructHeader(0, message.Signature());
        }