Beispiel #1
0
        private static void RunAsync()
        {
            while (Enviroment.Running)
            {
                while (_AsyncCommands.Count > 0)
                {
                    AsyncCommand command = _AsyncCommands.Dequeue();

                    try
                    {
                        if (command.CallBack == null)
                        {
                            command.Command.ExecuteNonQuery();
                        }
                        else
                        {
                            command.CallBack(command.Command.ExecuteReader(command.Behaviour));
                        }
                    }
                    catch (Exception ex)
                    {
                        PointBlankLogging.LogError("Could not send async command to server!", ex, false, false);
                    }
                }
            }
        }