コード例 #1
0
		internal static AsyncHTTPClient BuildPackage(AssetStoreAsset asset, AssetStoreResultBase<BuildPackageResult>.Callback callback)
		{
			string url = AssetStoreClient.APIUrl("/content/download/" + asset.packageID.ToString());
			BuildPackageResult r = new BuildPackageResult(asset, callback);
			return AssetStoreClient.CreateJSONRequest(url, delegate(AssetStoreResponse ar)
			{
				r.Parse(ar);
			});
		}
コード例 #2
0
 private void QueryAssetStore()
 {
   // ISSUE: object of a compiler-generated type is created
   // ISSUE: variable of a compiler-generated type
   ObjectListArea.\u003CQueryAssetStore\u003Ec__AnonStorey3B storeCAnonStorey3B = new ObjectListArea.\u003CQueryAssetStore\u003Ec__AnonStorey3B();
   // ISSUE: reference to a compiler-generated field
   storeCAnonStorey3B.\u003C\u003Ef__this = this;
   bool requeryAssetStore = this.m_RequeryAssetStore;
   this.m_RequeryAssetStore = false;
   if (this.m_ShowLocalAssetsOnly && !this.ShowAssetStoreHitsWhileSearchingLocalAssets())
     return;
   bool flag = this.m_LastAssetStoreQuerySearchFilter != string.Empty || this.m_LastAssetStoreQueryClassName.Length != 0 || this.m_LastAssetStoreQueryLabels.Length != 0;
   if (this.m_QueryInProgress)
     return;
   if (!flag)
     this.ClearAssetStoreGroups();
   else if (this.m_LastAssetStoreQueryChangeTime + 0.2 > EditorApplication.timeSinceStartup)
   {
     this.m_RequeryAssetStore = true;
     this.Repaint();
   }
   else
   {
     this.m_QueryInProgress = true;
     // ISSUE: reference to a compiler-generated field
     storeCAnonStorey3B.queryFilter = this.m_LastAssetStoreQuerySearchFilter + (object) this.m_LastAssetStoreQueryClassName + (object) this.m_LastAssetStoreQueryLabels;
     // ISSUE: reference to a compiler-generated method
     AssetStoreResultBase<AssetStoreSearchResults>.Callback callback = new AssetStoreResultBase<AssetStoreSearchResults>.Callback(storeCAnonStorey3B.\u003C\u003Em__51);
     List<AssetStoreClient.SearchCount> counts = new List<AssetStoreClient.SearchCount>();
     if (!requeryAssetStore)
     {
       using (List<ObjectListArea.AssetStoreGroup>.Enumerator enumerator = this.m_StoreAssets.GetEnumerator())
       {
         while (enumerator.MoveNext())
         {
           ObjectListArea.AssetStoreGroup current = enumerator.Current;
           AssetStoreClient.SearchCount searchCount = new AssetStoreClient.SearchCount();
           if (current.Visible && current.NeedItems)
           {
             searchCount.offset = current.Assets.Count;
             searchCount.limit = current.ItemsWantedShown - searchCount.offset;
           }
           searchCount.name = current.Name;
           counts.Add(searchCount);
         }
       }
     }
     AssetStoreClient.SearchAssets(this.m_LastAssetStoreQuerySearchFilter, this.m_LastAssetStoreQueryClassName, this.m_LastAssetStoreQueryLabels, counts, callback);
   }
 }
コード例 #3
0
		internal static AsyncHTTPClient AssetsInfo(List<AssetStoreAsset> assets, AssetStoreResultBase<AssetStoreAssetsInfo>.Callback callback)
		{
			string text = AssetStoreClient.APIUrl("/assets/list");
			foreach (AssetStoreAsset current in assets)
			{
				text = text + "&id=" + current.id.ToString();
			}
			AssetStoreAssetsInfo r = new AssetStoreAssetsInfo(callback, assets);
			return AssetStoreClient.CreateJSONRequest(text, delegate(AssetStoreResponse ar)
			{
				r.Parse(ar);
			});
		}
コード例 #4
0
		internal static AsyncHTTPClient DirectPurchase(int packageID, string password, AssetStoreResultBase<PurchaseResult>.Callback callback)
		{
			string url = AssetStoreClient.APIUrl(string.Format("/purchase/direct/{0}", packageID.ToString()));
			PurchaseResult r = new PurchaseResult(callback);
			Dictionary<string, string> dictionary = new Dictionary<string, string>();
			dictionary["password"] = password;
			return AssetStoreClient.CreateJSONRequestPost(url, dictionary, delegate(AssetStoreResponse ar)
			{
				r.Parse(ar);
			});
		}
コード例 #5
0
		internal static AsyncHTTPClient SearchAssets(string searchString, string[] requiredClassNames, string[] assetLabels, List<AssetStoreClient.SearchCount> counts, AssetStoreResultBase<AssetStoreSearchResults>.Callback callback)
		{
			string text = string.Empty;
			string text2 = string.Empty;
			string text3 = string.Empty;
			string text4 = string.Empty;
			foreach (AssetStoreClient.SearchCount current in counts)
			{
				text = text + text4 + current.offset;
				text2 = text2 + text4 + current.limit;
				text3 = text3 + text4 + current.name;
				text4 = ",";
			}
			if (Array.Exists<string>(requiredClassNames, (string a) => a.Equals("MonoScript", StringComparison.OrdinalIgnoreCase)))
			{
				Array.Resize<string>(ref requiredClassNames, requiredClassNames.Length + 1);
				requiredClassNames[requiredClassNames.Length - 1] = "Script";
			}
			string url = string.Format("{0}&q={1}&c={2}&l={3}&O={4}&N={5}&G={6}", new object[]
			{
				AssetStoreClient.APISearchUrl("/search/assets"),
				Uri.EscapeDataString(searchString),
				Uri.EscapeDataString(string.Join(",", requiredClassNames)),
				Uri.EscapeDataString(string.Join(",", assetLabels)),
				text,
				text2,
				text3
			});
			AssetStoreSearchResults r = new AssetStoreSearchResults(callback);
			return AssetStoreClient.CreateJSONRequest(url, delegate(AssetStoreResponse ar)
			{
				r.Parse(ar);
			});
		}
コード例 #6
0
 internal static AsyncHTTPClient BuildPackage(AssetStoreAsset asset, AssetStoreResultBase<BuildPackageResult>.Callback callback)
 {
   // ISSUE: object of a compiler-generated type is created
   // ISSUE: variable of a compiler-generated type
   AssetStoreClient.\u003CBuildPackage\u003Ec__AnonStorey57 packageCAnonStorey57 = new AssetStoreClient.\u003CBuildPackage\u003Ec__AnonStorey57();
   string url = AssetStoreClient.APIUrl("/content/download/" + asset.packageID.ToString());
   // ISSUE: reference to a compiler-generated field
   packageCAnonStorey57.r = new BuildPackageResult(asset, callback);
   // ISSUE: reference to a compiler-generated method
   return AssetStoreClient.CreateJSONRequest(url, new AssetStoreClient.DoneCallback(packageCAnonStorey57.\u003C\u003Em__95));
 }
コード例 #7
0
 internal static AsyncHTTPClient DirectPurchase(int packageID, string password, AssetStoreResultBase<PurchaseResult>.Callback callback)
 {
   // ISSUE: object of a compiler-generated type is created
   // ISSUE: variable of a compiler-generated type
   AssetStoreClient.\u003CDirectPurchase\u003Ec__AnonStorey56 purchaseCAnonStorey56 = new AssetStoreClient.\u003CDirectPurchase\u003Ec__AnonStorey56();
   string url = AssetStoreClient.APIUrl(string.Format("/purchase/direct/{0}", (object) packageID.ToString()));
   // ISSUE: reference to a compiler-generated field
   purchaseCAnonStorey56.r = new PurchaseResult(callback);
   Dictionary<string, string> dictionary = new Dictionary<string, string>();
   dictionary["password"] = password;
   // ISSUE: reference to a compiler-generated method
   return AssetStoreClient.CreateJSONRequestPost(url, dictionary, new AssetStoreClient.DoneCallback(purchaseCAnonStorey56.\u003C\u003Em__94));
 }
コード例 #8
0
 internal static AsyncHTTPClient AssetsInfo(List<AssetStoreAsset> assets, AssetStoreResultBase<AssetStoreAssetsInfo>.Callback callback)
 {
   // ISSUE: object of a compiler-generated type is created
   // ISSUE: variable of a compiler-generated type
   AssetStoreClient.\u003CAssetsInfo\u003Ec__AnonStorey55 infoCAnonStorey55 = new AssetStoreClient.\u003CAssetsInfo\u003Ec__AnonStorey55();
   string url = AssetStoreClient.APIUrl("/assets/list");
   using (List<AssetStoreAsset>.Enumerator enumerator = assets.GetEnumerator())
   {
     while (enumerator.MoveNext())
     {
       AssetStoreAsset current = enumerator.Current;
       url = url + "&id=" + current.id.ToString();
     }
   }
   // ISSUE: reference to a compiler-generated field
   infoCAnonStorey55.r = new AssetStoreAssetsInfo(callback, assets);
   // ISSUE: reference to a compiler-generated method
   return AssetStoreClient.CreateJSONRequest(url, new AssetStoreClient.DoneCallback(infoCAnonStorey55.\u003C\u003Em__93));
 }
コード例 #9
0
 internal static AsyncHTTPClient SearchAssets(string searchString, string[] requiredClassNames, string[] assetLabels, List<AssetStoreClient.SearchCount> counts, AssetStoreResultBase<AssetStoreSearchResults>.Callback callback)
 {
   // ISSUE: object of a compiler-generated type is created
   // ISSUE: variable of a compiler-generated type
   AssetStoreClient.\u003CSearchAssets\u003Ec__AnonStorey54 assetsCAnonStorey54 = new AssetStoreClient.\u003CSearchAssets\u003Ec__AnonStorey54();
   string str1 = string.Empty;
   string str2 = string.Empty;
   string str3 = string.Empty;
   string str4 = string.Empty;
   using (List<AssetStoreClient.SearchCount>.Enumerator enumerator = counts.GetEnumerator())
   {
     while (enumerator.MoveNext())
     {
       AssetStoreClient.SearchCount current = enumerator.Current;
       str1 = str1 + str4 + (object) current.offset;
       str2 = str2 + str4 + (object) current.limit;
       str3 = str3 + str4 + current.name;
       str4 = ",";
     }
   }
   if (Array.Exists<string>(requiredClassNames, (Predicate<string>) (a => a.Equals("MonoScript", StringComparison.OrdinalIgnoreCase))))
   {
     Array.Resize<string>(ref requiredClassNames, requiredClassNames.Length + 1);
     requiredClassNames[requiredClassNames.Length - 1] = "Script";
   }
   string url = string.Format("{0}&q={1}&c={2}&l={3}&O={4}&N={5}&G={6}", (object) AssetStoreClient.APISearchUrl("/search/assets"), (object) Uri.EscapeDataString(searchString), (object) Uri.EscapeDataString(string.Join(",", requiredClassNames)), (object) Uri.EscapeDataString(string.Join(",", assetLabels)), (object) str1, (object) str2, (object) str3);
   // ISSUE: reference to a compiler-generated field
   assetsCAnonStorey54.r = new AssetStoreSearchResults(callback);
   // ISSUE: reference to a compiler-generated method
   return AssetStoreClient.CreateJSONRequest(url, new AssetStoreClient.DoneCallback(assetsCAnonStorey54.\u003C\u003Em__92));
 }