public void TrackEvent(string str, string[] parameters, bool flush)
        {
            Dictionary <string, string> dr = new Dictionary <string, string>();

            for (int index = 0; index < parameters.GetLength(0); index += 2)
            {
                if (string.IsNullOrEmpty(parameters[index + 1]))
                {
                    continue;
                }
                dr.Add(parameters[index], parameters[index + 1]);
            }
            if (InnerClient == null)
            {
                return;
            }
            InnerClient.TrackEvent(str, dr);
            if (flush)
            {
                if (Count > 10)
                {
                    Task.Run(() => { InnerClient.Flush(); });
                    Count = 0;
                }
                else
                {
                    Count++;
                }
            }
        }
 public void Flush()
 {
     if (InnerClient != null)
     {
         InnerClient.Flush();
     }
 }
예제 #3
0
 public void Flush()
 {
     InnerClient.Flush();
 }