Exemple #1
0
        public void Dispose()
        {
            if (proxy != null)
            {
                // Submit event
                proxy.Exec(request);

                // Dispose proxy
                proxy.Dispose();
            }
        }
        public void Dispose()
        {
            if (proxy != null)
            {
                // Submit all events
                foreach (JSONRequest request in requests)
                {
                    proxy.Exec(request);
                }

                // Dispose proxy
                proxy.Dispose();
            }
        }
 public SimpleTelemetryProvider()
 {
     if (SimpleTelemetryProvider.bEnableTelemetryProvider)
     {
         try
         {
             proxy = new JSONClient(HostURL);
             // Ping the server if it faild null the provider
             var response = proxy.Exec(proxy.CreateRequest("request_id"));
             SessionID = (new JavaScriptSerializer()).Deserialize <SessionResponse>(response).result;
         }
         catch (Exception Exception)
         {
             Log.TraceError("SimpleTelemetryProvider Exception: " + Exception);
             proxy     = null;
             SessionID = null;
         }
     }
 }
        public SimpleTelemetryProvider()
        {
            if (SimpleTelemetryProvider.bEnableTelemetryProvider)
            {
                try
                {
                    proxy = new JSONClient(HostURL);
                    // Ping the server if it faild null the provider
                    var response = proxy.Exec(proxy.CreateRequest("request_id"));
                    SessionID = (new JavaScriptSerializer()).Deserialize<SessionResponse>(response).result;

                    // Create the request
                    request = proxy.CreateRequest(SimpleTelemetryProvider.MethodName, SessionID);
                }
                catch (Exception Exception)
                {
                    Log.TraceError("SimpleTelemetryProvider Exception: " + Exception);
                    proxy = null;
                    SessionID = null;
                }
            }
        }