Exemple #1
0
        /// <summary>
        /// Creates a record for this visitor in DailyStory and performs the association between their DailyStory ID and their email address.
        /// </summary>
        public void Convert()
        {
            if (string.IsNullOrEmpty(DsId))
            {
                return;
            }

            using (WebClient client = new WebClient())
            {
                NameValueCollection values = new NameValueCollection();
                Uri httpPostUrl            = new Uri(string.Format(url, DataCenter, SiteId));

                // Build the collection using the required values
                values.Add("dsid", DsId);
                values.Add("campaignid", CampaignId.ToString());
                values.Add("email", Email);
                values.Add("LeadSource", LeadSource);

                // Add optional items to collection
                foreach (string key in Properties.Keys)
                {
                    values.Add(key, Properties[key]);
                }

                byte[] response = client.UploadValues(httpPostUrl, values);
            }
        }
 public List <string> ToList()
 {
     return(new List <string>()
     {
         AdgroupId.ToString(),
         KeywordId.ToString(),
         CampaignId.ToString()
     });
 }
Exemple #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (CampaignId != 0L)
            {
                hash ^= CampaignId.GetHashCode();
            }
            if (Type != global::Google.Ads.GoogleAds.V10.Enums.SimulationTypeEnum.Types.SimulationType.Unspecified)
            {
                hash ^= Type.GetHashCode();
            }
            if (ModificationMethod != global::Google.Ads.GoogleAds.V10.Enums.SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unspecified)
            {
                hash ^= ModificationMethod.GetHashCode();
            }
            if (StartDate.Length != 0)
            {
                hash ^= StartDate.GetHashCode();
            }
            if (EndDate.Length != 0)
            {
                hash ^= EndDate.GetHashCode();
            }
            if (pointListCase_ == PointListOneofCase.CpcBidPointList)
            {
                hash ^= CpcBidPointList.GetHashCode();
            }
            if (pointListCase_ == PointListOneofCase.TargetCpaPointList)
            {
                hash ^= TargetCpaPointList.GetHashCode();
            }
            if (pointListCase_ == PointListOneofCase.TargetRoasPointList)
            {
                hash ^= TargetRoasPointList.GetHashCode();
            }
            if (pointListCase_ == PointListOneofCase.TargetImpressionSharePointList)
            {
                hash ^= TargetImpressionSharePointList.GetHashCode();
            }
            if (pointListCase_ == PointListOneofCase.BudgetPointList)
            {
                hash ^= BudgetPointList.GetHashCode();
            }
            hash ^= (int)pointListCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (HasCampaignId)
            {
                hash ^= CampaignId.GetHashCode();
            }
            if (HasCriterionId)
            {
                hash ^= CriterionId.GetHashCode();
            }
            if (Type != global::Google.Ads.GoogleAds.V9.Enums.SimulationTypeEnum.Types.SimulationType.Unspecified)
            {
                hash ^= Type.GetHashCode();
            }
            if (ModificationMethod != global::Google.Ads.GoogleAds.V9.Enums.SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unspecified)
            {
                hash ^= ModificationMethod.GetHashCode();
            }
            if (HasStartDate)
            {
                hash ^= StartDate.GetHashCode();
            }
            if (HasEndDate)
            {
                hash ^= EndDate.GetHashCode();
            }
            if (pointListCase_ == PointListOneofCase.BidModifierPointList)
            {
                hash ^= BidModifierPointList.GetHashCode();
            }
            hash ^= (int)pointListCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (campaignId_ != null)
            {
                hash ^= CampaignId.GetHashCode();
            }
            if (criterionId_ != null)
            {
                hash ^= CriterionId.GetHashCode();
            }
            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (ModificationMethod != 0)
            {
                hash ^= ModificationMethod.GetHashCode();
            }
            if (startDate_ != null)
            {
                hash ^= StartDate.GetHashCode();
            }
            if (endDate_ != null)
            {
                hash ^= EndDate.GetHashCode();
            }
            if (pointListCase_ == PointListOneofCase.BidModifierPointList)
            {
                hash ^= BidModifierPointList.GetHashCode();
            }
            hash ^= (int)pointListCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }