GetExtendedString() public method

public GetExtendedString ( ) : string
return string
Example #1
0
        private void SendAttributionRequestI()
        {
            if (_paused)
            {
                _logger.Debug("Attribution handler is paused");
                return;
            }

            _logger.Verbose("{0}", _attributionPackage.GetExtendedString());

            try
            {
                ResponseData responseData;
                using (var httpResponseMessage = Util.SendGetRequest(_attributionPackage, _urlQuery))
                {
                    responseData = Util.ProcessResponse(httpResponseMessage, _attributionPackage);
                }
                if (responseData is AttributionResponseData)
                {
                    CheckAttributionResponseI(responseData as AttributionResponseData);
                }
            }
            catch (Exception ex)
            {
                _logger.Error("Failed to get attribution ({0})", Util.ExtractExceptionMessage(ex));
            }
        }
        private void AddI(ActivityPackage activityPackage)
        {
            _packageQueue.Add(activityPackage);

            _logger.Debug("Added package {0} ({1})", _packageQueue.Count, activityPackage);
            _logger.Verbose("{0}", activityPackage.GetExtendedString());

            WritePackageQueueI();
        }
Example #3
0
        public void SendSdkClick(ActivityPackage sdkClickPackage)
        {
            _actionQueue.Enqueue(() =>
            {
                _packageQueue.Enqueue(sdkClickPackage);

                _logger.Debug("Added sdk_click {0}", _packageQueue.Count);
                _logger.Verbose("{0}", sdkClickPackage.GetExtendedString());

                SendNextSdkClick();
            });
        }
Example #4
0
        private void AddInternal(ActivityPackage activityPackage)
        {
            if (activityPackage.ActivityKind.Equals(ActivityKind.Click) && PackageQueue.Count > 0)
            {
                PackageQueue.Insert(1, activityPackage);
            }
            else
            {
                PackageQueue.Add(activityPackage);
            }

            Logger.Debug("Added package {0} ({1})", PackageQueue.Count, activityPackage);
            Logger.Verbose("{0}", activityPackage.GetExtendedString());

            WritePackageQueue();
        }
Example #5
0
        private void SendAttributionRequestI()
        {
            if (_paused)
            {
                _logger.Debug("Attribution handler is paused");
                return;
            }

            if (_activityHandler.IsGdprForgotten())
            {
                _logger.Debug("Attribution request won't be fired for forgotten user");
                return;
            }

            _logger.Verbose("{0}", _attributionPackage.GetExtendedString());

            try
            {
                ResponseData responseData;
                using (var httpResponseMessage = Util.SendGetRequest(_attributionPackage, _basePath, _urlQuery))
                {
                    responseData = Util.ProcessResponse(httpResponseMessage, _attributionPackage);
                }

                // check if any package response contains information that user has opted out
                // if yes, disable SDK and flush any potentially stored packages that happened afterwards
                if (responseData.TrackingState == TrackingState.OPTED_OUT)
                {
                    _activityHandler.SetTrackingStateOptedOut();
                    return;
                }

                if (responseData is AttributionResponseData)
                {
                    CheckAttributionResponseI(responseData as AttributionResponseData);
                }
            }
            catch (Exception ex)
            {
                _logger.Error("Failed to get attribution ({0})", Util.ExtractExceptionMessage(ex));
            }
        }
Example #6
0
        private void AddInternal(ActivityPackage activityPackage)
        {
            if (activityPackage.ActivityKind.Equals(ActivityKind.Click) && PackageQueue.Count > 0)
            {
                PackageQueue.Insert(1, activityPackage);
            }
            else
            {
                PackageQueue.Add(activityPackage);
            }

            Logger.Debug("Added package {0} ({1})", PackageQueue.Count, activityPackage);
            Logger.Verbose("{0}", activityPackage.GetExtendedString());

            WritePackageQueue();
        }