示例#1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.neo4j.bolt.runtime.BoltStateMachineState processBeginMessage(org.neo4j.bolt.v3.messaging.request.BeginMessage message, org.neo4j.bolt.runtime.StateMachineContext context) throws Exception
        private BoltStateMachineState ProcessBeginMessage(BeginMessage message, StateMachineContext context)
        {
            StatementProcessor statementProcessor = context.ConnectionState().StatementProcessor;

            statementProcessor.BeginTransaction(message.Bookmark(), message.TransactionTimeout(), message.TransactionMetadata());
            return(_txReadyState);
        }
示例#2
0
 private void WriteBegin(BeginMessage message)
 {
     try
     {
         Packer.packStructHeader(0, BeginMessage.SIGNATURE);
         Packer.pack(message.Meta());
     }
     catch (IOException e)
     {
         throw new UncheckedIOException(e);
     }
 }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldDecodeBeginMessage() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ShouldDecodeBeginMessage()
        {
            BeginMessage originalMessage = new BeginMessage(VirtualValues.map(new string[] { "tx_metadata", "tx_timeout" }, new AnyValue[] { EMPTY, longValue(10000) }));

            assertOriginalMessageEqualsToDecoded(originalMessage, _decoder);
        }