public static string GetCommand(this SmartfoxCommand v)
 {
     if (!commandMap.ContainsKey(v))
     {
         Log.LogError(v, "Smartfox command `" + v + "` has no command");
         throw new Exception("Smartfox command `" + v + "` has no command");
     }
     return(commandMap[v]);
 }
    internal void send(SmartfoxCommand socketCommands, IDictionary <string, SFSDataWrapper> parameters = null, object[] commandParameters = null, bool useUDP = false)
    {
        ISFSObject iSFSObject = SFSObject.NewInstance();

        if (parameters != null)
        {
            foreach (string key in parameters.Keys)
            {
                iSFSObject.Put(key, parameters[key]);
            }
        }
        Room currentRoom = getCurrentRoom();

        if (currentRoom != null)
        {
            string text = socketCommands.GetCommand();
            if (commandParameters != null)
            {
                text = string.Format(text, commandParameters);
            }
            send(new ExtensionRequest(text, iSFSObject, currentRoom, useUDP && isUDPEstablished));
        }
    }
 private static MemberInfo ForValue(SmartfoxCommand v)
 {
     return(typeof(SmartfoxCommand).GetField(Enum.GetName(typeof(SmartfoxCommand), v)));
 }
 private static SmartfoxCommandsAttribute GetAttr(SmartfoxCommand v)
 {
     return((SmartfoxCommandsAttribute)Attribute.GetCustomAttribute(ForValue(v), typeof(SmartfoxCommandsAttribute)));
 }