BuildEventPackage() 개인적인 메소드

private BuildEventPackage ( AdjustEvent adjustEvent ) : ActivityPackage
adjustEvent AdjustEvent
리턴 ActivityPackage
예제 #1
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();
        }
예제 #2
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();
        }