public override ITrackPageViewRequest Build()
        {
            this.CheckWholeObjectForCorrectnessOrThrow();

            Dictionary <string, string> customParameters = null;

            if (this.FieldsRawValuesByName != null)
            {
                customParameters = new Dictionary <string, string>(this.FieldsRawValuesByName);
            }

            this.EventParametersAccumulator = new UTEvent(
                this.EventParametersAccumulator.Timestamp,
                customParameters,
                this.EventParametersAccumulator.DefinitionId,
                this.EventParametersAccumulator.ItemId,
                this.EventParametersAccumulator.EngagementValue,
                this.EventParametersAccumulator.ParentEventId,
                this.EventParametersAccumulator.Text,
                this.EventParametersAccumulator.Duration,
                this.EventParametersAccumulator.TrackingInteractionId
                );

            UTPageView pageView = new UTPageView(
                this.EventParametersAccumulator,
                this.ItemLanguageValue,
                this.ItemVersionValue,
                this.UrlValue,
                this.SitecoreRenderingDeviceValue
                );

            TrackPageViewParameters result = new TrackPageViewParameters(null, pageView);

            return(result);
        }
        public override IUTPageView Build()
        {
            Dictionary <string, string> customParameters = null;

            if (this.FieldsRawValuesByName != null)
            {
                customParameters = new Dictionary <string, string>(this.FieldsRawValuesByName);
            }

            this.EventParametersAccumulator = new UTEvent(
                this.EventParametersAccumulator.Timestamp,
                customParameters,
                this.EventParametersAccumulator.DefinitionId,
                this.EventParametersAccumulator.ItemId,
                this.EventParametersAccumulator.EngagementValue,
                this.EventParametersAccumulator.ParentEventId,
                this.EventParametersAccumulator.Text,
                this.EventParametersAccumulator.Duration,
                this.EventParametersAccumulator.TrackingInteractionId,
                this.EventParametersAccumulator.type
                );


            var result = new UTPageView
                         (
                this.EventParametersAccumulator,
                this.ItemLanguageValue,
                this.ItemVersionValue,
                this.UrlValue,
                this.SitecoreRenderingDeviceValue
                         );

            return(result);
        }
        public ITrackPageViewRequest FillTrackPageViewGaps(ITrackPageViewRequest userRequest)
        {
            var utPageView = userRequest.PageView.DeepCopyUTPageView();

            //order matters!
            IUTSessionConfig mergedSessionConfig = this.SessionConfigMerger.FillSessionConfigGaps(userRequest.SessionConfig);

            var utEvent = this.ApplyActiveInteraction(utPageView, mergedSessionConfig);

            utEvent = this.ApplyDeviceIdentifier(utEvent);

            utPageView = new UTPageView(utEvent, utPageView.ItemLanguage, utPageView.ItemVersion, utPageView.Url, utPageView.SitecoreRenderingDevice);

            return(new TrackPageViewParameters(mergedSessionConfig, utPageView));
        }