void Send_Example2(string udid, byte platform) { KeyValueMessage message = new KeyValueMessage(IDTable[MessageID.Example2]); message.AddField("udid", udid); message.AddField("platform", platform); session.Send(message); }
void Send_Example1(string stringValue, int intValue, float floatValue, bool boolValue) { KeyValueMessage message = new KeyValueMessage(IDTable[MessageID.Example1]); message.AddField("stringValue", stringValue); message.AddField("intValue", intValue); message.AddField("floatValue", floatValue); message.AddField("boolValue", boolValue); session.Send(message); }
void SendExample1() { KeyValueMessage message = new KeyValueMessage(IDTable[MessageID.Example1]); message.AddField("stringValue", "abcd"); message.AddField("intValue", 1234); message.AddField("floatValue", 1234.5f); message.AddField("boolValue", true); session.Send(message); }
void SendExample2() { Example2Data data = new Example2Data(); data.stringValue = "abcd"; data.intValue = 1234; data.floatValue = 1234.5f; data.boolValue = true; KeyValueMessage message = new KeyValueMessage(IDTable[MessageID.Example2]); foreach (var field in typeof(Example2Data).GetFields()) { message.AddField(field.Name, field.GetValue(data)); } session.Send(message); }
void Send_GET_KEY(string version) { KeyValueMessage message = new KeyValueMessage(IDTable[MessageID.GET_KEY]); message.AddField("version", version); session.Send(message); }