Beispiel #1
0
        public IDs GetIDs()
        {
            IDs productIDs = new IDs();
            int count      = storeIDs.Count;

            for (int i = count - 1; i >= 0; i--)
            {
                IAPPlatform platform = (IAPPlatform)System.Enum.Parse(typeof(IAPPlatform), storeIDs[i].store);
                if (platform == IAPPlatform.None || string.IsNullOrEmpty(storeIDs[i].id))
                {
                    storeIDs.RemoveAt(i);
                    continue;
                }

                productIDs.Add(storeIDs[i].id, storeIDs[i].store);
            }

            if (productIDs.Count() > 0)
            {
                return(productIDs);
            }
            else
            {
                return(null);
            }
        }
Beispiel #2
0
 public string GetStoreIdByPlatform(IAPPlatform platform)
 {
     foreach (var id in storeIDs)
     {
         if (id.platform == platform)
         {
             return(id.id);
         }
     }
     return(string.Empty);
 }