//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldMarshalTokenRequest() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldMarshalTokenRequest() { ByteBuf buffer = Unpooled.buffer(); List <StorageCommand> commands = new List <StorageCommand>(); LabelTokenRecord before = new LabelTokenRecord(0); LabelTokenRecord after = new LabelTokenRecord(0); after.InUse = true; after.SetCreated(); after.NameId = 3232; commands.Add(new Command.LabelTokenCommand(before, after)); ReplicatedContent message = new ReplicatedTokenRequest(TokenType.LABEL, "theLabel", ReplicatedTokenRequestSerializer.commandBytes(commands)); AssertMarshalingEquality(buffer, message); }
public override void Dispatch(ReplicatedTokenRequest tokenRequest, long commandIndex, System.Action <Result> callback) { outerInstance.replicatedTxStateMachine.EnsuredApplied(); switch (tokenRequest.Type()) { case PROPERTY: outerInstance.propertyKeyTokenStateMachine.ApplyCommand(tokenRequest, commandIndex, callback); break; case RELATIONSHIP: outerInstance.relationshipTypeTokenStateMachine.ApplyCommand(tokenRequest, commandIndex, callback); break; case LABEL: outerInstance.labelTokenStateMachine.ApplyCommand(tokenRequest, commandIndex, callback); break; default: throw new System.InvalidOperationException(); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void handle(org.neo4j.causalclustering.core.state.machines.token.ReplicatedTokenRequest replicatedTokenRequest) throws java.io.IOException public override void Handle(ReplicatedTokenRequest replicatedTokenRequest) { WritableChannel.put(TOKEN_REQUEST_TYPE); ReplicatedTokenRequestSerializer.marshal(replicatedTokenRequest, WritableChannel); }
public override void Handle(ReplicatedTokenRequest replicatedTokenRequest) { Output.Add(ChunkedReplicatedContent.Single(TOKEN_REQUEST_TYPE, channel => ReplicatedTokenRequestSerializer.marshal(replicatedTokenRequest, channel))); }