Ejemplo n.º 1
0
        /// <summary>
        /// Get Site-Wide characteristics sets by category ID.
        /// </summary>
        /// <param name="catId">A specific category ID for which fetch Site-Wide CategoryCS data.</param>
        public int[] GetSiteWideCharSetsAttrIds(string catId)
        {
            SiteWideCharacteristicsTypeCollection swAttrs = GetSiteWideCharacteristics(catId);
            Int32Collection attrSetIds = new Int32Collection();

            for (int i = 0; i < swAttrs.Count; i++)
            {
                SiteWideCharacteristicsType swCharSet = swAttrs.ToArray()[i];
                int attrSetId = swCharSet.CharacteristicsSet.AttributeSetID;
                attrSetIds.Add(attrSetId);
            }

            return(attrSetIds.ToArray());
        }
Ejemplo n.º 2
0
        private bool isExcludedCategoryID(string catId, SiteWideCharacteristicsType swCharSet)
        {
            bool isExcluded = false;

            eBay.Service.Core.Soap.StringCollection excluded = swCharSet.ExcludeCategoryID;
            IEnumerator myEnumerator = excluded.GetEnumerator();

            while (myEnumerator.MoveNext())
            {
                string current = (string)myEnumerator.Current;
                if (current.Equals(catId))
                {
                    isExcluded = true;
                    break;
                }
            }
            return(isExcluded);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Get Site-Wide characteristics sets by category ID.
        /// </summary>
        /// <param name="catId">A specific category ID for which fetch Site-Wide CategoryCS data.</param>
        /// <returns>SiteWideCharacteristicsTypeCollection</returns>
        public SiteWideCharacteristicsTypeCollection GetSiteWideCharacteristics(string catId)
        {
            if (!validate())
            {
                init(catId);
            }
            SiteWideCharacteristicsTypeCollection swAttrs = new SiteWideCharacteristicsTypeCollection();

            for (int i = 0; i < mSiteWideCharacteristicSets.Count; i++)
            {
                SiteWideCharacteristicsType swCharSet = mSiteWideCharacteristicSets.ToArray()[i];
                if (isExcludedCategoryID(catId, swCharSet))
                {
                    continue;
                }
                swAttrs.Add(swCharSet);
            }
            return(swAttrs);
        }
		private bool isExcludedCategoryID(string catId, SiteWideCharacteristicsType swCharSet) 
		{
			bool isExcluded = false;
			eBay.Service.Core.Soap.StringCollection excluded = swCharSet.ExcludeCategoryID;
			IEnumerator myEnumerator = excluded.GetEnumerator();
			while(myEnumerator.MoveNext()) 
			{
				string current = (string)myEnumerator.Current;
				if(current.Equals(catId)) 
				{
					isExcluded = true;
					break;
				}
			}
			return isExcluded;
		}