internal static void WriteToRowValuesIfNotNull(PerformanceData performanceData, RowValues values)
 {
     if (performanceData != null)
     {
         performanceData.WriteToRowValues(values);
     }
 }
Beispiel #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);
            }
        }
        internal override void ProcessMappingsFromRowValues(RowValues values)
        {
            Campaign = new Campaign();

            values.ConvertToEntity(this, Mappings);

            QualityScoreData = QualityScoreData.ReadFromRowValuesOrNull(values);

            PerformanceData = PerformanceData.ReadFromRowValuesOrNull(values);
        }
Beispiel #5
0
        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(Campaign, "Campaign");

            this.ConvertToValues(values, Mappings);

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

                PerformanceData.WriteToRowValuesIfNotNull(PerformanceData, values);
            }
        }
 /// <summary>
 /// Initializes a new instance of the BulkKeywordBidSuggestion class.
 /// </summary>
 public BulkKeywordBidSuggestion()
 {
     PerformanceData = new PerformanceData();
 }
 /// <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));
     }
 }
 internal static void WriteToRowValuesIfNotNull(PerformanceData performanceData, RowValues values)
 {
     if (performanceData != null)
     {
         performanceData.WriteToRowValues(values);
     }
 }
        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);
        }