示例#1
0
        private void TransferSessionPackage()
        {
            // build Session Package
            var sessionBuilder = new PackageBuilder(AdjustConfig, DeviceInfo, ActivityState, DateTime.Now);
            var sessionPackage = sessionBuilder.BuildSessionPackage();

            // send Session Package
            PackageHandler.AddPackage(sessionPackage);
            PackageHandler.SendFirstPackage();
        }
示例#2
0
        public ActivityPackage GetDeeplinkClickPackage(Dictionary<string, string> extraParameters, AdjustAttribution attribution)
        {
            var now = DateTime.Now;

            var packageBuilder = new PackageBuilder(AdjustConfig, DeviceInfo, ActivityState, now);
            packageBuilder.ExtraParameters = extraParameters;

            return packageBuilder.BuildClickPackage("deeplink", now, attribution);
        }
示例#3
0
        private void TrackEventInternal(AdjustEvent adjustEvent)
        {
            if (!IsEnabled()) { return; }
            if (!CheckEvent(adjustEvent)) { return; }

            var now = DateTime.Now;

            ActivityState.EventCount++;
            UpdateActivityState(now);

            var packageBuilder = new PackageBuilder(AdjustConfig, DeviceInfo, ActivityState, now);
            ActivityPackage eventPackage = packageBuilder.BuildEventPackage(adjustEvent);
            PackageHandler.AddPackage(eventPackage);

            if (AdjustConfig.EventBufferingEnabled)
            {
                Logger.Info("Buffered event {0}", eventPackage.Suffix);
            }
            else
            {
                PackageHandler.SendFirstPackage();
            }

            WriteActivityStateInternal();
        }
示例#4
0
 public ActivityPackage GetAttributionPackage()
 {
     var now = DateTime.Now;
     var packageBuilder = new PackageBuilder(AdjustConfig, DeviceInfo, now);
     return packageBuilder.BuildAttributionPackage();
 }