Code: Select all
Client.SendRequest("CheckLogin","Login|Baium","Pass|123");
public static void SendRequest(string Command, params string[] arg)
{
SFSObject obj = new SFSObject();
foreach (string a in arg)
{
string key = a.Split('|')[0];
string value = a.Split('|')[1];
try { int val = Convert.ToInt32(value); obj.PutInt(key, val); } catch { }
try { bool val = Convert.ToBoolean(value); obj.PutBool(key, val); } catch { }
try { obj.PutUtfString(key, value); } catch { }
}
Client.connect_link.Send(new ExtensionRequest(Command, obj, Client.connect_link.LastJoinedRoom));
}
Rate it pls, and tell me if you know esialy or better decision.