Ejemplo n.º 1
0
 internal static void WriteToRowValuesIfNotNull(PerformanceData performanceData, RowValues values)
 {
     if (performanceData != null)
     {
         performanceData.WriteToRowValues(values);
     }
 }
Ejemplo n.º 2
0
        internal static PerformanceData ReadFromRowValuesOrNull(RowValues values)
        {
            var performanceData = new PerformanceData();

            performanceData.ReadFromRowValues(values);

            return(performanceData.HasAnyValues ? performanceData : null);
        }
        internal override void ProcessMappingsToRowValues(RowValues values, bool excludeReadonlyData)
        {
            this.ConvertToValues(values, Mappings);

            if (!excludeReadonlyData)
            {
                PerformanceData.WriteToRowValuesIfNotNull(PerformanceData, values);
            }
        }
Ejemplo n.º 4
0
        internal override void ProcessMappingsFromRowValues(RowValues values)
        {
            Keyword = new Keyword();

            values.ConvertToEntity(this, Mappings);

            QualityScoreData = QualityScoreData.ReadFromRowValuesOrNull(values);

            PerformanceData = PerformanceData.ReadFromRowValuesOrNull(values);
        }
Ejemplo n.º 5
0
        internal override void ProcessMappingsToRowValues(RowValues values, bool excludeReadonlyData)
        {
            ValidatePropertyNotNull(AdGroupCriterion, typeof(AdGroupCriterion).Name);

            this.ConvertToValues(values, Mappings);

            if (!excludeReadonlyData)
            {
                PerformanceData.WriteToRowValuesIfNotNull(PerformanceData, values);
            }
        }
        internal override void ProcessMappingsFromRowValues(RowValues values)
        {
            AdGroup = new AdGroup {
                AdDistribution = 0
            };

            values.ConvertToEntity(this, Mappings);

            QualityScoreData = QualityScoreData.ReadFromRowValuesOrNull(values);

            PerformanceData = PerformanceData.ReadFromRowValuesOrNull(values);
        }
        internal override void ProcessMappingsToRowValues(RowValues values, bool excludeReadonlyData)
        {
            ValidatePropertyNotNull(AdGroup, "AdGroup");

            this.ConvertToValues(values, Mappings);

            if (!excludeReadonlyData)
            {
                QualityScoreData.WriteToRowValuesIfNotNull(QualityScoreData, values);

                PerformanceData.WriteToRowValuesIfNotNull(PerformanceData, values);
            }
        }
Ejemplo n.º 8
0
        internal override void ProcessMappingsFromRowValues(RowValues values)
        {
            AdGroupCriterion = new BiddableAdGroupCriterion
            {
                Criterion = new Webpage()
                {
                    Parameter = new WebpageParameter(),
                    Type      = typeof(Webpage).Name,
                },
                CriterionBid = new FixedBid
                {
                    Type = typeof(FixedBid).Name,
                },
                Type = typeof(BiddableAdGroupCriterion).Name
            };

            values.ConvertToEntity(this, Mappings);

            PerformanceData = PerformanceData.ReadFromRowValuesOrNull(values);
        }
 /// <summary>
 /// Outputs the PerformanceData
 /// </summary>
 private void OutputBulkPerformanceData(PerformanceData performanceData)
 {
     if (performanceData != null)
     {
         OutputStatusMessage("PerformanceData: ");
         OutputStatusMessage(string.Format("AverageCostPerClick: {0}", performanceData.AverageCostPerClick));
         OutputStatusMessage(string.Format("AverageCostPerThousandImpressions: {0}", performanceData.AverageCostPerThousandImpressions));
         OutputStatusMessage(string.Format("AveragePosition: {0}", performanceData.AveragePosition));
         OutputStatusMessage(string.Format("Clicks: {0}", performanceData.Clicks));
         OutputStatusMessage(string.Format("ClickThroughRate: {0}", performanceData.ClickThroughRate));
         OutputStatusMessage(string.Format("Conversions: {0}", performanceData.Conversions));
         OutputStatusMessage(string.Format("CostPerConversion: {0}", performanceData.CostPerConversion));
         OutputStatusMessage(string.Format("Impressions: {0}", performanceData.Impressions));
         OutputStatusMessage(string.Format("Spend: {0}", performanceData.Spend));
     }
 }
 /// <summary>
 /// Initializes a new instance of the BulkKeywordBidSuggestion class.
 /// </summary>
 public BulkKeywordBidSuggestion()
 {
     PerformanceData = new PerformanceData();
 }
Ejemplo n.º 11
0
 internal static void WriteToRowValuesIfNotNull(PerformanceData performanceData, RowValues values)
 {
     if (performanceData != null)
     {
         performanceData.WriteToRowValues(values);
     }
 }
Ejemplo n.º 12
0
        internal static PerformanceData ReadFromRowValuesOrNull(RowValues values)
        {
            var performanceData = new PerformanceData();

            performanceData.ReadFromRowValues(values);

            return performanceData.HasAnyValues ? performanceData : null;            
        }
        internal override void ProcessMappingsFromRowValues(RowValues values)
        {
            values.ConvertToEntity(this, Mappings);

            PerformanceData = PerformanceData.ReadFromRowValuesOrNull(values);
        }